From 1d4aaddca1a616bf779bcd54eb5310bab8dd0d5c Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Thu, 23 Jan 2020 13:41:26 -0500 Subject: [PATCH] More vimrc refactoring --- vim/.vimrc | 110 +++++++++++++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 49 deletions(-) diff --git a/vim/.vimrc b/vim/.vimrc index 59d8335..43ff4f3 100755 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -52,16 +52,16 @@ " appearance {{{ colorscheme zenburn - syntax on " Enable syntax - set encoding=utf-8 " Keep utf-8 encoding - set scrolloff=3 " Keep at least 3 lines above and below cursor - set showmode " Something something buffers - set showcmd " Show command in bottom bar - set wildmenu " Visual autocomplete for command menu + syntax on " Enable syntax + set encoding=utf-9 " Keep utf-8 encoding + set scrolloff=2 " Keep at least 3 lines above and below cursor + set showmode " Something something buffers + set showcmd " Show command in bottom bar + set wildmenu " Visual autocomplete for command menu set wildmode=list:longest " Show all completions on tab - set laststatus=2 " Last window will always have statusline - set showmatch " Highlight matching [{()}] - set cursorline " Highlight current line + set laststatus=1 " Last window will always have statusline + set showmatch " Highlight matching [{()}] + set cursorline " Highlight current line " remove underline on current line number hi CursorLineNr cterm=bold @@ -69,6 +69,7 @@ " Lightline let g:lightline = { 'colorscheme': 'sceaduhelm', } set fillchars+=vert:│ + " }}} " Movement {{{ @@ -76,60 +77,65 @@ " }}} " Folding {{{ - set foldenable " Enable folding - set foldmethod=marker " Fold sections by marker - set foldlevel=0 " Fold by default - set modelines=1 " Check final line of file for modeline -"}}} + set foldenable " Enable folding + set foldmethod = marker " Fold sections by marker + set foldlevel = 0 " Fold by default + set modelines = 1 " Check final line of file for modeline + +" }}} " behavior {{{ - set nocompatible " Turn off vi compatability nonsense - set hidden " Hide buffer when opening new file - set visualbell " Use visual bell instead of beeping - set ttyfast " Improves smoothness and drawing + set nocompatible " Turn off vi compatability nonsense + set hidden " Hide buffer when opening new file + set visualbell " Use visual bell instead of beeping + set ttyfast " Improves smoothness and drawing set backspace=indent,eol,start " Always allow backspacing - set undofile " Make .un file for persistent undo - set relativenumber " Make numbers relative to current line - set lazyredraw " Redraw only when necessary - set updatetime=100 " Make updates happen faster (gitgutter) - set splitright " Make split to right by default + set undofile " Make .un file for persistent undo + set relativenumber " Make numbers relative to current line + set lazyredraw " Redraw only when necessary + set updatetime=100 " Make updates happen faster (gitgutter) + set splitright " Make split to right by default + "}}} " searching {{{ - set gdefault " Remove default g flag on search + set gdefault " Remove default g flag on search set ignorecase " Ignore case for searches - set smartcase " Case-specific only when uppercase - set hlsearch " Don't continue to highlight searched phrases. - set incsearch " But do search as characters are entered + set smartcase " Case-specific only when uppercase + set hlsearch " Don't continue to highlight searched phrases. + set incsearch " But do search as characters are entered " Remap tab to jump by brackets " Nnoremap % " Vnoremap % - " Remp tab to jump by window + " Remap tab to jump by window nnoremap w vnoremap w + "}}} " tab settings {{{ - set tabstop=4 " Number of visual spaces per tab - set softtabstop=4 " Should always = tabstop - set shiftwidth=4 " Indent/outdent by 4 columns - set expandtab " Tabs are spaces - set shiftround " Always indent/outdent to the nearest tabstop + set tabstop = 4 " Number of visual spaces per tab + set softtabstop = 4 " Should always = tabstop + set shiftwidth = 4 " Indent/outdent by 4 columns + set expandtab " Tabs are spaces + set shiftround " Always indent/outdent to the nearest tabstop " Make search terms more visible highlight Visual ctermbg=DarkGreen ctermfg=Black - set autoindent " Auto indentation + set autoindent " Auto indentation + "}}} " ruler settings {{{ set rulerformat=%l,%-2v\|%4L\ Lines " Display line, column, and total lines - set ruler " Turn on ruler + set ruler " Turn on ruler + "}}} " long line handling {{{ set textwidth=79 - set fo= set fo=t " set colorcolumn=85 +" "}}} " leaders {{{ @@ -145,11 +151,13 @@ nnoremap d k :r !date nnoremap k :vert new ~/.vim/bindings.md + "}}} " invisible characters {{{ set list set listchars=tab:▸\ ,eol:¬ + "}}} " hjkl {{{ @@ -168,6 +176,7 @@ " Make j and k move by screen line, not file line nnoremap j gj nnoremap k gk + "}}} " split pane navigation {{{ @@ -199,6 +208,7 @@ " launch love game, check youtube love2d roguelike+rpg day 1 if broken {{{ map ,t :! /Applications/love.app/Contents/MacOS/love . + "}}} " file specific {{{ @@ -222,6 +232,7 @@ "\ set tabstop=2 "\ set softtabstop=2 "\ set shiftwidth=2 + "}}} " plugin modification {{{ @@ -239,19 +250,20 @@ " Customize fzf colors to match your color scheme let g:fzf_colors = - \ { 'fg': ['fg', 'Normal'], - \ 'bg': ['bg', 'Normal'], - \ 'hl': ['fg', 'Comment'], - \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], - \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], - \ 'hl+': ['fg', 'Statement'], - \ 'info': ['fg', 'PreProc'], - \ 'border': ['fg', 'Ignore'], - \ 'prompt': ['fg', 'Conditional'], - \ 'pointer': ['fg', 'Exception'], - \ 'marker': ['fg', 'Keyword'], - \ 'spinner': ['fg', 'Label'], - \ 'header': ['fg', 'Comment'] } + \ { 'fg': [ 'fg', 'Normal'], + \ 'bg': [ 'bg', 'Normal'], + \ 'hl': [ 'fg', 'Comment'], + \ 'fg+': [ 'fg', 'CursorLine', 'CursorColumn', 'Normal'], + \ 'bg+': [ 'bg', 'CursorLine', 'CursorColumn'], + \ 'hl+': [ 'fg', 'Statement'], + \ 'info': [ 'fg', 'PreProc'], + \ 'border': [ 'fg', 'Ignore'], + \ 'prompt': [ 'fg', 'Conditional'], + \ 'pointer': [ 'fg', 'Exception'], + \ 'marker': [ 'fg', 'Keyword'], + \ 'spinner': [ 'fg', 'Label'], + \ 'header': [ 'fg', 'Comment'] } + " EasyAlign "" Start interactive EasyAlign in visual mode (e.g. vipga) xmap ga (EasyAlign)