Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

557 lines
17 KiB

6 years ago
6 years ago
6 years ago
6 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
7 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
5 years ago
5 years ago
5 years ago
6 years ago
5 years ago
6 years ago
5 years ago
6 years ago
6 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
5 years ago
  1. " set x=y [[[ "
  2. set autoindent
  3. set autoread
  4. set background=dark
  5. " set colorcolumn=80
  6. set clipboard+=unnamedplus
  7. set diffopt=filler,context:3
  8. if has('nvim-0.3.2') || has("patch-8.1.0360")
  9. set diffopt=filler,internal,algorithm:histogram,indent-heuristic
  10. endif
  11. set encoding=utf-8
  12. set expandtab
  13. " set foldmethod=indent
  14. set foldmethod=marker
  15. set hlsearch
  16. set ignorecase
  17. set linebreak
  18. set linespace=5
  19. set mouse=a
  20. " set mouse=c
  21. " set noswapfile
  22. set relativenumber
  23. set shiftwidth=4
  24. set smartcase
  25. set tabstop=4
  26. " set t_Co=256
  27. " set termguicolors
  28. " set timeoutlen=350
  29. set timeoutlen=200
  30. " set tw=80
  31. " set tw=75
  32. set tw=70
  33. set undodir=~/.vim/undo
  34. set undofile
  35. " set updatetime=1000
  36. " set updatetime=500
  37. set updatetime=0
  38. autocmd VimResized * wincmd =
  39. filetype plugin on
  40. filetype indent on
  41. syntax on
  42. autocmd CursorHold * if !bufexists("[Command Line]") | checktime | endif
  43. " cursor indicator [[[ "
  44. " set listchars=tab:\|\
  45. " set list
  46. " set cursorcolumn
  47. " set cursorline
  48. " ]]] cursor indicator "
  49. " ]]] set x=y "
  50. " commands for file types [[[ "
  51. autocmd BufNewFile,BufRead .* set syntax=sh
  52. autocmd FileType *css,htmldjango,html,javascript,json,lisp,markdown,tex,text,yaml set tabstop=2 shiftwidth=2
  53. " autocmd BufNewFile,BufRead *.md set filetype=markdown
  54. " autocmd Filetype markdown set textwidth=0
  55. " autocmd Filetype html set foldmarker=0
  56. autocmd BufNewFile,BufRead *.gd set expandtab!
  57. autocmd Filetype go set expandtab! sw=4
  58. " autocmd Filetype markdown set commentstring=<!---\ %s\ -->
  59. autocmd Filetype markdown map <F8> :LivedownToggle<CR>
  60. autocmd Filetype markdown nnoremap <Tab> <Esc>>>A
  61. autocmd Filetype markdown inoremap <S-Tab> <Esc><<A
  62. autocmd Filetype markdown inoremap < <Esc><<A
  63. autocmd Filetype markdown inoremap << <
  64. autocmd Filetype markdown inoremap > <Esc>>>A
  65. autocmd Filetype markdown inoremap >> >
  66. " format options [[[ "
  67. " a = auto-format paragraphs
  68. " c = wrap comments
  69. " j = remove comment header when joining lines
  70. " M = don't add space when joining lines
  71. " q = format comments with gq
  72. " t = wrap lines
  73. " v = break lines in insert
  74. " w = whitespace continues paragraph
  75. " ]]] format options "
  76. " autocmd FileType markdown,tex,text set spell spelllang=en_us formatoptions=cjMqtvw
  77. autocmd FileType markdown,tex,text set spell spelllang=en_us formatoptions=acjMqtvw
  78. " autocmd FileType tex,text set spell spelllang=en_us formatoptions=acjMqtvw
  79. autocmd FileType python,lua set fdm=indent
  80. autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR>
  81. autocmd Filetype json set foldmethod=marker
  82. autocmd FileType sh map <F8> :!clear && shellcheck %<CR>
  83. autocmd FileType tex set updatetime=1000 timeoutlen=300
  84. autocmd FileType tex map <F8> :VimtexCompile<CR>
  85. autocmd VimEnter *.tex VimtexCompile
  86. autocmd VimLeave *.tex !tex-clean %:p
  87. autocmd BufNewFile,BufRead *.tmpl set tw=0 sw=2 ft=go-template fmr=[[[,]]]
  88. " " auto-reload vimrc [[[ "
  89. " augroup myvimrc
  90. " au!
  91. " au BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
  92. " augroup END
  93. " " ]]] auto-reload vimrc "
  94. " ]]] commands for file types "
  95. " commands for specific files [[[ "
  96. autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab
  97. autocmd BufWritePost config.def.h silent !cd %:p:h; sudo rm config.h; sudo bear make install
  98. " autocmd BufRead config.def.h map <F8> :silent !cd %:p:h; sudo rm config.h; sudo bear make install<CR>
  99. autocmd BufRead config.def.h map <F10> :silent !cd %:p:h<CR>:!sudo rm config.h; sudo bear make install<CR>
  100. autocmd BufRead config.def.h set updatetime=3000
  101. autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
  102. autocmd VimLeave /etc/default/grub !sudo grub-mkconfig -o /boot/grub/grub.cfg
  103. " autocmd BufWritePost key_* !sync-shortcuts
  104. autocmd BufNewFile,BufRead key_* map <F1> :w<CR>:silent !sync-shortcuts<CR>
  105. " map <F1> :silent !scp %:p k@192.168.0.17:/home/k/a1<CR>
  106. " map <F2> :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1<CR>
  107. " map <F6> :make -C ~/Documents/resume cv<CR>
  108. " ]]] commands for specific files "
  109. " vim-plug [[[
  110. " plug auto-install
  111. if empty(glob('~/.vim/autoload/plug.vim'))
  112. silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
  113. \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  114. autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
  115. endif
  116. call plug#begin('~/.vim/plugged')
  117. " prequisite for other plugins
  118. Plug 'vim-scripts/L9'
  119. " find files from within Vim
  120. " Plug 'vim-scripts/FuzzyFinder'
  121. {{ if not .gui }}
  122. " Gotham color scheme
  123. Plug 'whatyouhide/vim-gotham'
  124. {{ end }}
  125. " " collection of Vim color schemes
  126. " Plug 'flazz/vim-colorschemes'
  127. " " preview Vim color scheme easily within Vim
  128. " Plug 'xolox/vim-colorscheme-switcher'
  129. " " prerequisite for above plugin
  130. " Plug 'xolox/vim-misc'
  131. " automatically save buffers upon returning to normal mode
  132. Plug '907th/vim-auto-save'
  133. let g:auto_save = 1
  134. " let g:auto_save_events = ["CursorHold", "CursorHoldI"]
  135. let g:auto_save_events = ["CursorHold"]
  136. " autocmd VimEnter *.tex let g:auto_save = 0
  137. " provides various functionality for writing LaTeX in Vim
  138. Plug 'lervag/vimtex'
  139. " au BufWritePost *.tex silent call Tex_RunLaTeX()
  140. au BufWritePost *.tex silent !pkill -USR1 xdvi.bin
  141. let g:Tex_MultipleCompileFormats = 'dvi,pdf'
  142. let g:vimtex_view_general_viewer = 'zathura'
  143. let g:vimtex_quickfix_latexlog = {
  144. \ 'overfull' : 0,
  145. \ 'underfull' : 0,
  146. \ 'global' : 0,
  147. \ 'references' : 0,
  148. \ 'unused' : 0,
  149. \}
  150. let g:vimtex_quickfix_autoclose_after_keystrokes = 5
  151. " let g:vimtex_compiler_latexmk = {
  152. " \ 'continuous' : 0,
  153. " \}
  154. {{ if not (eq .chezmoi.username "root") }}
  155. " auto-completion for various languages
  156. Plug 'Valloric/YouCompleteMe'
  157. let g:ycm_filetype_blacklist = {
  158. \ 'tagbar': 1,
  159. \ 'qf': 1,
  160. \ 'notes': 1,
  161. \ 'unite': 1,
  162. \ 'vimwiki': 1,
  163. \ 'pandoc': 1,
  164. \ 'infolog': 1,
  165. \ 'mail': 1
  166. \}
  167. {{ end }}
  168. " wrote short bits of text that expand into whatever you want
  169. " demo: https://www.youtube.com/watch?v=Zik6u0klD40
  170. Plug 'SirVer/ultisnips'
  171. " better key bindings for UltiSnipsExpandTrigger
  172. let g:UltiSnipsExpandTrigger = "<tab>"
  173. let g:UltiSnipsJumpForwardTrigger = "<tab>"
  174. let g:UltiSnipsJumpBackwardTrigger = "<C-tab>"
  175. let g:ultisnips_javascript = {
  176. \ 'keyword-spacing': 'always',
  177. \ 'semi': 'never',
  178. \ 'space-before-function-paren': 'never',
  179. \ }
  180. " custom snippets
  181. Plug 'Kevin-Mok/vim-snippets'
  182. " to make YouCompleteMe work with UltiSnips (both use Tab)
  183. Plug 'ervandew/supertab'
  184. " make YCM compatible with UltiSnips (using supertab)
  185. let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
  186. let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
  187. let g:SuperTabDefaultCompletionType = '<C-n>'
  188. " easily comment/uncomment lines
  189. Plug 'scrooloose/nerdcommenter'
  190. let g:NERDTrimTrailingWhitespace = 1
  191. let g:NERDSpaceDelims = 1
  192. " add quotes/brackets around chunks of text easily
  193. Plug 'tpope/vim-surround'
  194. nmap S ys
  195. " navigate around file easily and precisely
  196. Plug 'easymotion/vim-easymotion'
  197. map <Space> <Plug>(easymotion-prefix)
  198. " status bar displaying various info about the current buffer
  199. Plug 'vim-airline/vim-airline'
  200. let g:airline_section_c = '%F'
  201. Plug 'vim-airline/vim-airline-themes'
  202. let g:airline_powerline_fonts = 1
  203. " continue Markdown lists when started
  204. Plug 'dkarter/bullets.vim'
  205. " coordinate Vim color scheme with terminal color scheme
  206. Plug 'dylanaraps/wal.vim'
  207. " repeat plugin commands
  208. Plug 'tpope/vim-repeat'
  209. " better Django support
  210. Plug 'tweekmonster/django-plus.vim'
  211. " auto-close brackets
  212. Plug 'jiangmiao/auto-pairs'
  213. let g:AutoPairsMapSpace = 0
  214. Plug 'henrik/vim-indexed-search'
  215. Plug 'PotatoesMaster/i3-vim-syntax'
  216. " vim file explorer
  217. Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
  218. Plug 'terryma/vim-multiple-cursors'
  219. " let g:multi_cursor_select_all_word_key='<C-a>'
  220. let g:multi_cursor_exit_from_visual_mode=0
  221. let g:multi_cursor_exit_from_insert_mode=0
  222. Plug 'dag/vim-fish'
  223. " live preview Markdown"
  224. " Plug 'shime/vim-livedown'
  225. Plug 'suan/vim-instant-markdown', {'for': 'markdown'}
  226. " git helper
  227. Plug 'tpope/vim-fugitive'
  228. " auto reload file
  229. Plug 'djoshea/vim-autoread'
  230. " Plug 'mustache/vim-mustache-handlebars'
  231. " Plug 'trapd00r/vim-syntax-vidir-ls'
  232. Plug 'calviken/vim-gdscript3'
  233. " display hex colors in Vim
  234. Plug 'RRethy/vim-hexokinase'
  235. Plug 'junegunn/goyo.vim'
  236. " prevent commands being executed through modelines "
  237. Plug 'ciaranm/securemodelines/'
  238. " different colors for each layer of surrounding brackets
  239. Plug 'luochen1990/rainbow'
  240. let g:rainbow_active = 1
  241. " easy custom text objects
  242. Plug 'kana/vim-textobj-user'
  243. " latex custom text objects
  244. Plug 'rbonvall/vim-textobj-latex'
  245. " swap words
  246. Plug 'tommcdo/vim-exchange'
  247. Plug 'scrooloose/nerdtree'
  248. let NERDTreeQuitOnOpen=1
  249. let NERDTreeShowHidden=1
  250. Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  251. Plug 'junegunn/fzf.vim'
  252. Plug 'christoomey/vim-tmux-navigator'
  253. " mappings [[[ "
  254. let g:tmux_navigator_no_mappings = 1
  255. nnoremap <A-j> :TmuxNavigateDown<cr>
  256. nnoremap <A-k> :TmuxNavigateUp<cr>
  257. nnoremap <A-h> :TmuxNavigateLeft<cr>
  258. nnoremap <A-l> :TmuxNavigateRight<cr>
  259. " nnoremap <C-Down> :TmuxNavigateDown<cr>
  260. " nnoremap <C-Up> :TmuxNavigateUp<cr>
  261. " nnoremap <C-Left> :TmuxNavigateLeft<cr>
  262. " nnoremap <C-Right> :TmuxNavigateRight<cr>
  263. " ]]] mappings "
  264. " highlight multiple words
  265. " TODO: mapping conflicts "
  266. " Plug 'inkarkat/vim-mark'
  267. " Plug 'jceb/vim-orgmode'
  268. " let g:org_todo_keywords=['TODO', 'STARTED', '|', 'DONE']
  269. " ]]] vim-plug "
  270. " Mappings [[[ "
  271. call plug#end()
  272. {{ if .gui }}
  273. colorscheme wal
  274. {{ else }}
  275. colorscheme gotham256
  276. {{ end }}
  277. " normal mappings [[[ "
  278. " visual select across lines by default "
  279. nnoremap v <C-V>
  280. " last macro "
  281. nnoremap Q @@
  282. " toggle fold "
  283. nnoremap , za
  284. " jump to horizontal position for mark "
  285. nnoremap ' `
  286. " indenting
  287. nnoremap > >>
  288. nnoremap < <<
  289. inoremap << <Esc><<A
  290. " ]]] normal mappings "
  291. " leader mappings [[[ "
  292. let mapleader="\<Space>"
  293. " find alias
  294. nnoremap <leader>a /^ <Left>
  295. nnoremap <leader>ac :.s/\(\w\w\)/\u\1\U\2/g<CR>
  296. " replace until end of line
  297. nnoremap <leader>c c$
  298. " delete until end of line
  299. nnoremap <leader>d d$
  300. " delete entire buffer
  301. nnoremap <leader>dg ggdG
  302. " delete entire line
  303. nnoremap <leader>dl 0d$
  304. " delete lines matching pattern
  305. nnoremap <leader>dls :g//d<left><left>
  306. " show docstring for cur word
  307. nnoremap <leader>do :YcmCompleter GetDoc<CR>
  308. " delete line into system clipboard
  309. nnoremap <leader>D "+dd
  310. " delete entire buffer into system clipboard
  311. nnoremap <leader>DA "+ggdG
  312. " find copied text
  313. nnoremap <leader>f q/p<CR>
  314. " find merge conflicts
  315. nnoremap <leader>fc /[<>=\|]\{7\}<CR>
  316. " reload folds
  317. nnoremap <leader>fmi :set foldmethod=indent<CR> zM
  318. nnoremap <leader>fmm :set foldmethod=marker<CR> zM
  319. " add marker foldmethod modeline
  320. nnoremap <leader>fi :YcmCompleter FixIt<CR>
  321. " check filetype
  322. nnoremap <leader>ft :se ft?<CR>
  323. " check todo's
  324. nnoremap <leader>ftd /TODO<CR>
  325. nnoremap <leader>g :YcmCompleter GoTo<CR>
  326. " vimdiff split
  327. nnoremap <leader>gd :Gvdiff
  328. nnoremap <leader>gdh :Gvdiff HEAD~
  329. nnoremap <leader>gdm :Gvdiff master<CR>
  330. " toggle search highlighting
  331. nnoremap <leader>h :set hlsearch! hlsearch?<CR>
  332. " help
  333. nnoremap <leader>he :vert help
  334. nnoremap <leader>ht :set tabstop=2 shiftwidth=2 expandtab<CR>
  335. nnoremap <leader>vhe :vert help
  336. " don't add space when joining lines "
  337. nnoremap <leader>j gJ
  338. " join all paragraphs into single line "
  339. nnoremap <leader>jl :set tw=9999999<CR>gggqG
  340. " format current line
  341. nnoremap <leader>l Vgq
  342. " format this and next line
  343. nnoremap <leader>ll Vjgq
  344. " move cursor to middle of line
  345. " nnoremap <leader>m :call cursor(0, len(getline('.'))/2)<CR>
  346. nnoremap <leader>m :vert Man
  347. " apply normal command to selection
  348. vnoremap <leader>n q:anorm
  349. nnoremap <leader>nt :NERDTree<CR>
  350. " check if in neovim
  351. nnoremap <leader>nv :echo has('nvim')<CR>
  352. " don't wrap lines
  353. nnoremap <leader>nw :set nowrap<CR>
  354. " recursively open fold
  355. nnoremap <leader>o zO
  356. " paste from?
  357. " nnoremap <leader>p "*p
  358. " format paragraph
  359. nnoremap <leader>p gqip
  360. " Plug commands
  361. nnoremap <leader>pli :PlugInstall<CR>
  362. nnoremap <leader>plc :PlugClean<CR>
  363. nnoremap <leader>plu :PlugUpdate<CR>
  364. " don't break lines
  365. nnoremap <leader>py :set tw=0<CR>
  366. " replace in next x lines
  367. nnoremap <leader>r q:i.,.+s///g<ESC>Fsi
  368. " replace in line
  369. nnoremap <leader>rl q:i.s///g<left><left><left>
  370. " replace in visual selection
  371. " remove italics tags
  372. nnoremap <leader>rmi :%s/<\/\?i>//g<CR>
  373. " reload vim config
  374. nnoremap <leader>rv :source $MYVIMRC<CR>
  375. vnoremap <leader>r q:is///g<ESC>3ha
  376. " replace in entire file
  377. nnoremap <leader>R q:i%s///g<ESC>2F/i
  378. vnoremap <leader>s :sort<CR>
  379. nnoremap <leader>sc :set spell spelllang=en_us<CR>
  380. " run current file in shell
  381. nnoremap <leader>sh :!%:p
  382. " sort lines until end of file
  383. nnoremap <leader>so q:i.,$sort<CR>
  384. " sort lines
  385. nnoremap <leader>sol q:i.,.+sort<ESC>Fsi
  386. " set syntax to shell (for dotfiles)
  387. nnoremap <leader>sys :set syn=sh<CR>
  388. vnoremap <leader>t :!tac<CR>
  389. " capitalize letter
  390. nnoremap <leader>u vU
  391. " open vimrc in vertical split
  392. nnoremap <leader>vv :vsp ~/.vimrc<CR>
  393. " copy next thing to system clipboard
  394. " nnoremap <leader>y "+
  395. " nnoremap <leader>Y "+Y
  396. nnoremap <leader>y y$
  397. nnoremap <leader>yo :Goyo<CR>
  398. " yank entire buffer
  399. nnoremap <leader>yg ggyG
  400. " toggle fold
  401. nnoremap <leader>z za
  402. " close all folds
  403. nnoremap <leader>zm zM
  404. " open all folds
  405. nnoremap <leader>zr zR
  406. " ]]] leader mappings "
  407. " function keys [[[ "
  408. map <F3> :wa<CR>
  409. map <F4> :xa<CR>
  410. map <F5> :q!<CR>
  411. map <F6> :qa!<CR>
  412. map <F7> :AutoSaveToggle<CR>
  413. " reload file
  414. nnoremap <F9> :e<CR>
  415. nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
  416. nnoremap <F11> :set paste<CR>"*p:set nopaste<CR>
  417. " ]]] function keys "
  418. map <S-Enter> O<ESC>
  419. " swap text visually
  420. vnoremap <C-P> <Esc>`.``gvP``P
  421. ino <C-A> <C-O>yiW<End>=<C-R>=<C-R>0<CR>
  422. " splits [[[ "
  423. nnoremap <C-Down> <C-W><C-J>
  424. nnoremap <C-Up> <C-W><C-K>
  425. nnoremap <C-Right> <C-W><C-L>
  426. nnoremap <C-Left> <C-W><C-H>
  427. " Maximize height/width.
  428. nnoremap <C-g> <C-W>_
  429. nnoremap <C-w> <C-W>|
  430. " ]]] splits "
  431. " ]]] Mappings "
  432. " Local Mappings [[[ "
  433. let maplocalleader="\\"
  434. " tex [[[ "
  435. autocmd Filetype tex inoremap <localleader>bt \bowtie
  436. autocmd Filetype tex inoremap <localleader>c \checkmark
  437. autocmd Filetype tex inoremap <localleader>d \delta
  438. autocmd Filetype tex inoremap <localleader>D \Delta
  439. autocmd Filetype tex inoremap <localleader>e \exists
  440. autocmd Filetype tex inoremap <localleader>ep \epsilon
  441. autocmd Filetype tex inoremap <localleader>fa \forall
  442. autocmd Filetype tex inoremap <localleader>g \geq
  443. autocmd Filetype tex inoremap <localleader>i \in
  444. autocmd Filetype tex inoremap <localleader>la \leftarrow
  445. autocmd Filetype tex inoremap <localleader>le \leq
  446. autocmd Filetype tex inoremap <localleader>ln \log n
  447. autocmd Filetype tex inoremap <localleader>lr \Leftrightarrow
  448. " autocmd Filetype tex inoremap <localleader>n \neg
  449. autocmd Filetype tex inoremap <localleader>n \neq
  450. autocmd Filetype tex inoremap <localleader>N \mathbb{N}
  451. autocmd Filetype tex inoremap <localleader>pg \pagebreak<Enter>
  452. autocmd Filetype tex inoremap <localleader>ph [,phantom]
  453. autocmd Filetype tex inoremap <localleader>q \qquad
  454. autocmd Filetype tex inoremap <localleader>r \rightarrow
  455. autocmd Filetype tex inoremap <localleader>R \Rightarrow
  456. autocmd Filetype tex inoremap <localleader>s \subset
  457. autocmd Filetype tex inoremap <localleader>st such that
  458. autocmd Filetype tex inoremap <localleader>S \Sigma
  459. autocmd Filetype tex inoremap <localleader>t \times
  460. " autocmd Filetype tex inoremap <localleader>T $T$
  461. autocmd Filetype tex inoremap <localleader>T \Theta
  462. " replace bars/underscores in URL
  463. autocmd Filetype tex inoremap <localleader>url :.s/\([-_]\)/\\\1/g<CR>
  464. autocmd Filetype tex inoremap <localleader>v \vee
  465. autocmd Filetype tex inoremap <localleader>w \wedge
  466. autocmd Filetype tex inoremap <localleader>x $x$-axis
  467. autocmd Filetype tex inoremap <localleader>y $y$-axis
  468. autocmd Filetype tex inoremap <localleader>Z \mathbb{Z}
  469. " par3
  470. autocmd Filetype tex inoremap <localleader>wx $w(x)$
  471. autocmd Filetype tex inoremap <localleader>tx $t(x)$
  472. " ]]] tex "
  473. autocmd Filetype c inoremap <localleader>uc unsigned char
  474. autocmd BufNewFile,BufRead *.h nnoremap <localleader>x 0iextern <Esc>f{hc$;<Esc>
  475. autocmd Filetype fish inoremap <localleader>1 $argv[1]
  476. autocmd Filetype fish inoremap <localleader>2 $argv[2]
  477. autocmd Filetype javascript inoremap <localleader>x process.exit()
  478. autocmd Filetype markdown inoremap <localleader>cb - [ ]
  479. autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
  480. " nnoremap <localleader>x 0f[lrx
  481. autocmd Filetype go-template inoremap <localleader>e {{"{{ else }}"}}
  482. autocmd Filetype go-template inoremap <localleader>hd {{"{{ .chezmoi.homedir }}"}}
  483. autocmd Filetype go-template nnoremap <localleader>fp :%s/{{"{{{"}}/[[[/g<CR>:%s/}}}/]]]/g<CR>
  484. autocmd Filetype python inoremap <localleader>bp breakpoint()
  485. autocmd Filetype python inoremap <localleader>s self.
  486. " ]]] Local Mappings "
  487. " vim: fdm=marker ft=vim.go-template