Press SPC w t
to dedicate the current window to the current buffer. This is helpful when you have an important buffer that you don't want to get replaced by another buffer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun tjs/configure-dired () | |
(dired-hide-details-mode 1)) | |
(defun tjs/major-mode-equals (buffer major-mode) | |
(message (format "Testing buffer: %s" buffer)) | |
(let ((result (equal major-mode (tjs/buffer-major-mode buffer)))) | |
(message (if result | |
(format "Mode match: %s" major-mode) | |
(format "No Mode match: %s" major-mode))) | |
result)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
¡ !I 0xa1 161 INVERTED EXCLAMATION MARK | |
¢ Ct 0xa2 162 CENT SIGN | |
£ Pd 0xa3 163 POUND SIGN | |
¤ Cu 0xa4 164 CURRENCY SIGN | |
¥ Ye 0xa5 165 YEN SIGN | |
¦ BB 0xa6 166 BROKEN BAR | |
§ SE 0xa7 167 SECTION SIGN | |
¨ ': 0xa8 168 DIAERESIS | |
© Co 0xa9 169 COPYRIGHT SIGN | |
ª -a 0xaa 170 FEMININE ORDINAL INDICATOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! ReplaceMagicWithConstant(Arg, Start, Stop) | |
let constantName = input("Enter Constant Name: ") | |
call append(line("'<") - 1, printf("%s = %s", l:constantName, a:Arg)) | |
execute printf("'<, '>s/%s/%s/gc", a:Arg, l:constantName) | |
endfunction | |
function! CandidateMagic(ArgLead, CmdLine, CursorPos) | |
let allWords = uniq(sort(split(join(getline("'<", "'>")), '\W\+'))) | |
call filter(allWords, {idx, val -> -1 != stridx(val, a:ArgLead)}) | |
return allWords |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
BROWSER=Chrome | |
CANCELLED=0 | |
COVERAGE_DATA=.coverage | |
COVERAGE_REPORT_DIR=htmlcov | |
POLL_INTERVAL=5 | |
trap ctrl_c INT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#+OPTIONS: num:nil | |
* Bookmarks | |
** C-x r m - Create Bookmark | |
** C-x r l - List Bookmarks | |
Allows you to delete bookmarks. Does not use EVIL bindings. | |
* Spacemacs SPC Commands | |
** SPC ! - Shell Command | |
Runs a shell command in the current directory. The command output is captured |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Makes an ASCII art rendition of the arguments and embeds it in a '#' comment. | |
# Requires figlet (e.g. homebrew install figlet) | |
# Only uses '#' comment style. Your JavaScript and C++ will not be happy. | |
figlet -w 80 -c $* | sed 's/^/#/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
scala_version=2.12.1 | |
function create_directories() | |
{ | |
project_name=$1 | |
mkdir -p ${project_name}/src/{main,test}/scala/com/timjstewart | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util.Try | |
trait Show[T] { | |
def shows(t: T): Try[String] | |
} | |
trait ShowProtocol { | |
implicit val showAccount: Show[Account] | |
implicit val showCustomer: Show[Customer] | |
} |
NewerOlder