summaryrefslogtreecommitdiff
path: root/.config/vim
diff options
context:
space:
mode:
author0scar <qgt268@alumni.ku.dk>2023-09-18 07:52:30 +0000
committer0scar <qgt268@alumni.ku.dk>2023-09-18 07:52:30 +0000
commit8daf79c5e9d90897dcf3fe68b4666f3080879cbc (patch)
tree27befdc112c2e7a9566e14238d5f55e5849fb472 /.config/vim
parentdc41e975667fbf468f913a23eadf81b9b193ea9a (diff)
Update nvim configuration
Diffstat (limited to '.config/vim')
-rw-r--r--.config/vim/vimrc21
1 files changed, 15 insertions, 6 deletions
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
index 7805be9..5250a4e 100644
--- a/.config/vim/vimrc
+++ b/.config/vim/vimrc
@@ -7,6 +7,10 @@ set fileencoding=utf-8
set encoding=utf-8
set fileformats=unix
+" Avoid infinite screen recursion
+unlet $SSH_CLIENT
+
+" Set sane defaults, if not using neovim already
if !has('nvim')
let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
" Check if the backup/swap dir exists
@@ -117,10 +121,15 @@ endif
autocmd BufWritePre * %s/\s\+$//e
" Move around in insert mode with Alt+{hjkl}
-imap <A-h> <Left>
-imap <A-l> <Right>
-imap <A-k> <Up>
-imap <A-j> <Down>
+inoremap <A-h> <Left>
+inoremap <A-l> <Right>
+inoremap <A-k> <Up>
+inoremap <A-j> <Down>
+
+nnoremap <A-h> <C-w>h
+nnoremap <A-j> <C-w>j
+nnoremap <A-k> <C-w>k
+nnoremap <A-l> <C-w>l
" Go to end/start of line, like in the shell
imap <C-E> <ESC>A
@@ -149,7 +158,7 @@ vnoremap <leader>{ <ESC>`>a}<ESC>`<i{<ESC>
"" Plugin settings
" junegunn/fzf.vim bindings
-noremap <C-f> :Files %:h<cr>
+noremap <C-f> :Files<cr>
noremap <C-b> :Buffers<cr>
" lervag/vimtex
@@ -250,4 +259,4 @@ if has('nvim')
call plug#end()
endif
-colorscheme tokyonight
+colorscheme night-owl