From 6b456c1b7a4f6899f063a6e65355af51901d9c7a Mon Sep 17 00:00:00 2001 From: William Carroll Date: Wed, 9 Oct 2019 12:13:56 +0100 Subject: Massive configuration overhaul Currently paying the price of months of non-diligent git usage. Here's what has changed. - Theming support in Gvcci and wpgtk - Dropping support for i3 - Supporting EXWM - Many Elisp modules - Collapsed redundant directories in ./configs --- configs/shared/.config/nvim/simple.vim | 98 ++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 configs/shared/.config/nvim/simple.vim (limited to 'configs/shared/.config/nvim/simple.vim') diff --git a/configs/shared/.config/nvim/simple.vim b/configs/shared/.config/nvim/simple.vim new file mode 100644 index 000000000000..ea40964ee803 --- /dev/null +++ b/configs/shared/.config/nvim/simple.vim @@ -0,0 +1,98 @@ +" My barebones vimrc without any Vundle dependencies. +" +" I'm attempting to optimize the following: +" - Minimize dependencies +" - Maximize ergonomics +" - Maximize Tmux compatibility +" - Minimize shadowing of existing Vim KBDs +" +" Warning: This is currently unstable as it is a work-in-progress. +" +" Author: William Carroll + +" Use as the leader key. +let mapleader = " " +nnoremap ev :tabnew:edit ~/.vimrc +nnoremap sv :source ~/.vimrc +nnoremap w :w +nnoremap h :help + +" increment,decrement numbers +nnoremap + +" TODO: Restore with better KBD +" nnoremap - + +" Visit the CWD +nnoremap - :e . + +" Turn line numbers on. +set number + +" Easily create vertical, horizontal window splits. +nnoremap sh :vsplit +nnoremap sj :split:wincmd j +nnoremap sk :split +nnoremap sl :vsplit:wincmd l + +" Move across window splits. +" TODO: Change to . +nnoremap :wincmd h +nnoremap :wincmd j +nnoremap :wincmd k +nnoremap :wincmd l + +" TODO: Support these. +" nnoremap :q +" nnoremap :wincmd h +" nnoremap :wincmd j +" nnoremap :wincmd k +" nnoremap :wincmd l + +" Use instead of G to support: +" 20 - to jump to line 20 +" d20 - to delete from the current line until line 20 +" 20 - to select from the current line until line 20 +nnoremap G +onoremap G +vnoremap G + +" Easily change modes on keyboards that don't have CapsLock mapped to +inoremap jk + +" CRUD tabs. +nnoremap :tabnext +nnoremap :tabprevious +nnoremap :tabnew:edit . +nnoremap :tabclose +" TODO: Re-enable these once are supported. +" nnoremap :+tabmove +" nnoremap :-tabmove + +" Use H,L to goto beggining,end of a line. +" Swaps the keys to ensure original functionality of H,L are preserved. +nnoremap H ^ +nnoremap L $ +nnoremap ^ H +nnoremap $ L + +" Use H,L in visual mode too +vnoremap H ^ +vnoremap L $ +vnoremap ^ H +vnoremap $ L + +" Emacs hybrid mode +" TODO: model this after tpope's rsi.vim (Readline-style insertion) +cnoremap +cnoremap +inoremap ^ +inoremap $ +inoremap h +inoremap l + +" Indenting +" The following three settings are based on option 2 of `:help tabstop` +set tabstop=4 +set shiftwidth=4 +set expandtab +set autoindent -- cgit 1.4.1