diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 8a32e99..2562859 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -43,29 +43,6 @@ set termguicolors call s:SourceConfigFilesIn('plugins') -" Remaps -nnoremap so :so ~/.config/nvim/init.vim -nnoremap x :!chmod +x % - -" Yank from the current column to the end of the line -nnoremap Y yg$ - -" Move lines up and down -inoremap :m .+1==gi -inoremap :m .-2==gi -vnoremap :m '<-2gv=gv -vnoremap :m '>+1gv=gv - -" Keep things centred -nnoremap n nzzzv -nnoremap N Nzzzv - -" Remove arrow keys -noremap -noremap -noremap -noremap - autocmd FileType gitcommit highlight ColorColumn ctermbg=8 autocmd FileType gitcommit setlocal colorcolumn=50,72 autocmd FileType gitcommit setlocal textwidth=72 @@ -74,6 +51,4 @@ autocmd FileType gitcommit setlocal spell " Display extra whitespace set list listchars=tab:»·,trail:· -nnoremap :silent !tmux neww tmux-sessioniser - lua require("opdavies") diff --git a/nvim/.config/nvim/plugins/mappings.vim b/nvim/.config/nvim/plugins/mappings.vim new file mode 100644 index 0000000..6b27a6a --- /dev/null +++ b/nvim/.config/nvim/plugins/mappings.vim @@ -0,0 +1,26 @@ +" Source the current file +nnoremap so :so ~/.config/nvim/init.vim + +" Make the current file executable +nnoremap x :!chmod +x % + +" Yank from the current column to the end of the line +nnoremap Y yg$ + +" Move lines up and down +inoremap :m .+1==gi +inoremap :m .-2==gi +vnoremap :m '<-2gv=gv +vnoremap :m '>+1gv=gv + +" Keep things centred +nnoremap n nzzzv +nnoremap N Nzzzv + +" Remove arrow keys +noremap +noremap +noremap +noremap + +nnoremap :silent !tmux neww tmux-sessioniser