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
commit4d44bff605c600dbc032cb02fea48c75989aeb7a (patch)
tree9a153d2f1ae7ae5b8155ebce934b766226d1edd7 /home
parentAdd gitea2mastodon CGI script (diff)
downloadsrc-4d44bff605c600dbc032cb02fea48c75989aeb7a.tar.gz
src-4d44bff605c600dbc032cb02fea48c75989aeb7a.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 '')
-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>