summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-17 21:54:53 -0400
committerJune McEnroe <june@causal.agency>2018-08-17 21:54:53 -0400
commitd2e8e98b244f778f650684e0984197b5da513b46 (patch)
tree07075f952cc0bc9cb85c06613b4d83b1ff266e81 /home
parentAdd gitea2mastodon CGI script (diff)
downloadsrc-d2e8e98b244f778f650684e0984197b5da513b46.tar.gz
src-d2e8e98b244f778f650684e0984197b5da513b46.zip
Add vim mapping to add a #include
Unfortunately as far as I know I can't have it automatically sort them
after I hit escape.
Diffstat (limited to 'home')
-rw-r--r--home/.config/nvim/init.vim1
1 files changed, 1 insertions, 0 deletions
diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim
index a3e8bb93..3651af62 100644
--- a/home/.config/nvim/init.vim
+++ b/home/.config/nvim/init.vim
@@ -26,5 +26,6 @@ tmap <C-w> <C-\><C-n><C-w>
 let g:clipboard = {'copy':{'+':'pbcopy'},'paste':{'+':'pbpaste'}}
 
 nmap <leader>h :0/^#include </,$?^#include <?sort<CR>:nohlsearch<CR>
+nmap <leader>a ?^#include <<CR>:nohlsearch<CR>o#include <
 nmap <leader>u :0/^use/,$?^use?sort<CR>:nohlsearch<CR>
 nmap <leader>c :0/extern crate/,$?extern crate?sort<CR>:nohlsearch<CR>