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.

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