From ac5294ae7aaa8668f0a74e32c1786a25adbbb80f Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Sun, 6 Aug 2017 16:12:32 -0600 Subject: Add ZSH config based on changs/slim-zsh --- base/.vimrc | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'base/.vimrc') diff --git a/base/.vimrc b/base/.vimrc index 4e3858a..627d7b0 100644 --- a/base/.vimrc +++ b/base/.vimrc @@ -1,11 +1,9 @@ set nocompatible +set encoding=utf-8 set modelines=0 " for security -set encoding=utf-8 - set mouse="" - set backspace=indent,eol,start au FocusLost * :wa @@ -37,6 +35,9 @@ set shiftround " use multiple of shiftwidth with '<' and '>' set autoindent set copyindent " copy the previous line's indentation +xnoremap < >gv + " Search ====---- set incsearch set hlsearch @@ -137,6 +138,9 @@ nnoremap S ?{jV/^\s*\}?$k:sort:noh nnoremap q gqip nnoremap vp V`] nnoremap h :syntax sync fromstart +nnoremap l :nohlsearch:diffupdate:syntax sync fromstart +nnoremap [ :put! =repeat(nr2char(10), v:count1)'[ +nnoremap ] :put =repeat(nr2char(10), v:count1) noremap + :s/^\s*/&\/\//:noh noremap - :s/^\(\s*\)\/\//\1/:noh @@ -189,18 +193,22 @@ nnoremap h :Hexmode function! NumberToggle() if(&relativenumber == 1) - set number + set norelativenumber else set relativenumber endif endfunc nnoremap N :call NumberToggle() -autocmd InsertEnter * :set number -autocmd InsertLeave * :set relativenumber +"autocmd InsertEnter * :set norelativenumber +"autocmd InsertLeave * :set relativenumber " Custom functions ====---- +if filereadable(expand("~/.vimrc.local")) + source ~/.vimrc.local +endif + function! SetLocalOptions(fname) let dirname = fnamemodify(a:fname, ":p:h") while "/" != dirname @@ -218,3 +226,10 @@ au BufNewFile,BufRead * call SetLocalOptions(bufname("%")) " To move elsewhere ====---- au BufNewFile,BufRead *.less set filetype=less +autocmd! BufWritePost $MYVIMRC source $MYVIMRC +packadd! matchit +cnoremap +cnoremap +autocmd! BufRead,BufNewFile *.md set filetype=markdown +autocmd! BufRead,BufNewFile *.md set spell +vnoremap p "_dP -- cgit v1.2.3-70-g09d2