summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-24 20:16:23 +0300
committerThomas Voss <mail@thomasvoss.com> 2023-08-24 20:16:23 +0300
commit868fc8fd16ee08f3c941ffb74e7a089b185120c0 (patch)
tree788bb24ca0755246f59376aa594582d571fe309c /.config
parentd82cce5433304882442bcb4c3910ac2187699785 (diff)
nvim: Add nvim configuration
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/init.vim30
1 files changed, 30 insertions, 0 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
new file mode 100644
index 0000000..9c02ea3
--- /dev/null
+++ b/.config/nvim/init.vim
@@ -0,0 +1,30 @@
+nnoremap € $
+vnoremap € $
+nnoremap ) 0
+vnoremap ) 0
+nnoremap < <<
+nnoremap > >>
+nnoremap K :vert Man<cr>
+vnoremap K :vert Man<cr>
+nnoremap <c-h> <c-w>h
+nnoremap <c-j> <c-w>j
+nnoremap <c-k> <c-w>k
+nnoremap <c-l> <c-w>l
+nnoremap V <c-v>
+nnoremap <c-v> V
+nnoremap <c-n> :make<cr>
+
+fu! SortWords()
+ if visualmode() == "V"
+ '<,'>!sort -
+ else
+ '<,'>s/\%V.*\%V\w*/\=join(sort(split(submatch(0))), ' ')
+ endif
+endfu
+
+vnoremap s :<c-u>call SortWords()<cr>
+
+set noet
+set tw=80 colorcolumn=81
+set secure exrc
+set splitright splitbelow