~smlavine/dots

321439b0436e1b3b9a6fe1b6a5ba8920a30454ee — Sebastian LaVine 14 days ago cd92d4f
Load .vimlocal in ftplugin/go.vim instead of init.vim

Before, I couldn't "overwrite" bindings made in ftplugin/vim.go in
.vimlocal, because ftplugin/go.vim is ran after init.vim. Since I (so
far, at least) have only wanted to use this in a Go project, this works
for me. To be specific, this is the .vimlocal I'm using:

nnoremap <leader>r :!bin/mazegenerator \| bin/mazesolver<CR>

" For command-line arguments
nnoremap <leader>e :!bin/mazegenerator \| bin/mazesolver<space>

Just a way to have a project-specific run command.
2 files changed, 3 insertions(+), 3 deletions(-)

M src/.config/nvim/ftplugin/go.vim
M src/.config/nvim/init.vim
M src/.config/nvim/ftplugin/go.vim => src/.config/nvim/ftplugin/go.vim +3 -0
@@ 8,3 8,6 @@ nnoremap <leader>e :GoRun .<space>
nnoremap <leader>j :cnext<CR>
nnoremap <leader>k :cprevious<CR>
nnoremap <leader><space> :cclose<CR>

" If there is a local (project-specific) vim file, use it
silent! so .vimlocal

M src/.config/nvim/init.vim => src/.config/nvim/init.vim +0 -3
@@ 166,6 166,3 @@ nnoremap <F12> :match MatchIndentBadIndent //<CR>

" Add make binding.
nnoremap <leader>m :make<CR>

" If there is a local (project-specific) vim file, use it
silent! so .vimlocal