if !exists('$LANG') && &encoding ==# 'latin1' set encoding=utf-8 endif scriptencoding utf-8 function! s:OptionSplit(string) abort return map( \ split(&runtimepath, '\\\@ 703 || v:version == 703 && has('patch693') set softtabstop=-1 else let &softtabstop = &shiftwidth endif set backspace+=eol set backspace+=indent set backspace+=start set linebreak if has('multi_byte_encoding') set showbreak=… else set showbreak=... endif if exists('+breakindent') set breakindent endif set confirm set noesckeys set formatoptions+=l set formatoptions+=1 if v:version > 703 || v:version == 703 && has('patch541') set formatoptions+=j endif set cpoptions+=J if has('patch-8.1.728') set formatoptions+=p endif if has('gui_running') set guioptions+=M endif set hidden set hlsearch nohlsearch set incsearch set lazyredraw set listchars+=tab:>- set listchars+=trail:- set listchars+=nbsp:+ if has('multi_byte_encoding') set listchars+=extends:»,precedes:« else set listchars+=extends:>,precedes:< endif set nomodeline set nrformats-=octal set noruler set sessionoptions-=localoptions set sessionoptions-=options set noshowcmd set shortmess+=I if !&loadplugins || globpath(&runtimepath, 'plugin/matchparen.vim') ==# '' set showmatch matchtime=3 endif set splitbelow splitright set synmaxcol=500 if &term =~# '^putty\|^tmux' set ttyfast endif set ttymouse= set virtualedit+=block set visualbell t_vb= set wildmenu set wildmode=list:longest,full set wildignore=*~,#*# \,*.7z \,.DS_Store \,.git \,.hg \,.svn \,*.a \,*.adf \,*.asc \,*.au \,*.aup \,*.avi \,*.bin \,*.bmp \,*.bz2 \,*.class \,*.db \,*.dbm \,*.djvu \,*.docx \,*.exe \,*.filepart \,*.flac \,*.gd2 \,*.gif \,*.gifv \,*.gmo \,*.gpg \,*.gz \,*.hdf \,*.ico \,*.iso \,*.jar \,*.jpeg \,*.jpg \,*.m4a \,*.mid \,*.mp3 \,*.mp4 \,*.o \,*.odp \,*.ods \,*.odt \,*.ogg \,*.ogv \,*.opus \,*.pbm \,*.pdf \,*.png \,*.ppt \,*.psd \,*.pyc \,*.rar \,*.rm \,*.s3m \,*.sdbm \,*.sqlite \,*.swf \,*.swp \,*.tar \,*.tga \,*.ttf \,*.wav \,*.webm \,*.xbm \,*.xcf \,*.xls \,*.xlsx \,*.xpm \,*.xz \,*.zip if exists('+wildignorecase') set wildignorecase endif if !exists('syntax_on') syntax enable endif autocmd vimrc ColorScheme * \ let &cursorline = g:colors_name ==# 'sahara' if !exists('$COLORFGBG') && get(v:, 'termrbgresp', '') ==# '' set background=dark endif if &background ==# 'dark' \ && (has('gui_running') || &t_Co >= 256) \ && globpath(&runtimepath, 'colors/sahara.vim') !=# '' colorscheme sahara endif nnoremap nnoremap \ line('w$') < line('$') \ ? "\" \ : ":\next\" if &loadplugins && globpath(&runtimepath, 'plugin/insert_cancel.vim') !=# '' imap (InsertCancel) endif imap (DigraphSearch) nnoremap \ :nohlsearch inoremap :execute "normal \" vmap gv nnoremap & \ :&& xnoremap & \ :&& nmap g: (ColonOperator) nnoremap [a \ :previous nnoremap ]a \ :next nnoremap [b \ :bprevious nnoremap ]b \ :bnext nnoremap [c \ :cprevious nnoremap ]c \ :cnext nnoremap [l \ :lprevious nnoremap ]l \ :lnext nmap [ (PutBlankLinesAbove) nmap ] (PutBlankLinesBelow) let mapleader = '\' let maplocalleader = ',' if maplocalleader ==# ',' noremap ,, , sunmap ,, endif nnoremap \ :set autoindent! autoindent? nnoremap c \ :set cursorline! cursorline? nnoremap h \ :set hlsearch! hlsearch? nnoremap i \ :set incsearch! incsearch? nnoremap s \ :set spell! spell? nnoremap C \ :set cursorcolumn! cursorcolumn? xmap C Cgv nnoremap l \ :set list! list? xmap l lgv nnoremap n \ :set number! number? xmap n ngv nnoremap N \ :set ruler! ruler? xmap N Ngv nnoremap w \ :set wrap! wrap? xmap w wgv nnoremap f \ :set formatoptions? nnoremap u \ :set spelllang=en_us nnoremap z \ :set spelllang=en_nz nmap b (CopyLinebreakToggle) nnoremap a \ :ToggleFlagLocal formatoptions a nnoremap L \ :ToggleFlagLocal colorcolumn +1 xmap L Lgv nmap p PasteInsert nnoremap F \ :ReloadFileType nnoremap t \ :set filetype? nnoremap T \ :set filetype= nnoremap d \ :PutDate nnoremap D \ :PutDate! nnoremap g \ :echo expand('%:p') nnoremap G \ :cd %:hpwd nnoremap P \ :Establish %:h nnoremap H \ :history : nnoremap k \ :marks nnoremap K \ :function nnoremap m \ :nmap nnoremap M \ :nmap nnoremap S \ :scriptnames nnoremap U \ :command nnoremap v \ :let g: v: nnoremap V \ :let b: t: w: nnoremap y \ :registers nnoremap \ :bdelete nnoremap \ :enew nnoremap e \ :set modifiable noreadonly nnoremap E \ :set nomodifiable readonly nnoremap j \ :buffers:buffer nmap o (SelectOldFiles) nnoremap x \ :StripTrailingWhitespace xnoremap x \ :StripTrailingWhitespace nnoremap X \ :SqueezeRepeatBlanks xnoremap X \ :SqueezeRepeatBlanks nnoremap = \ :KeepPosition execute 'normal! 1G=G' nnoremap + \ :KeepPosition execute 'normal! 1GgqG' onoremap _ \ :execute 'normal! `[v`]' onoremap % \ :execute 'normal! 1GVG' omap 5 % map { (VerticalRegionUp) sunmap { map } (VerticalRegionDown) sunmap } noremap \ `" sunmap \ nnoremap \ :'[,'] nnoremap > \ :'[,']> nnoremap / \ :vimgrep /\c/j ** nnoremap ? \ :lhelpgrep \c nnoremap . \ :lmake! nnoremap q gqap nmap r (ReplaceOperator) xmap r (ReplaceOperator) nnoremap ! \ :! nmap 1 ! nmap # (AlternateFileType) nmap 3 # nmap $ (Fortune) nmap 4 $ nmap & (RegexEscape) nmap 7 & xmap & (RegexEscape) xmap 7 & nnoremap * *N nmap 8 * nnoremap ` \ :ScratchBuffer nnoremap ~ \ :vertical ScratchBuffer nnoremap R \ :ReloadVimrc inoreabbrev tr@ tom@sanctum.geek.nz inoreabbrev tr/ inoreabbrev almsot almost inoreabbrev wrnog wrong inoreabbrev Fielding Feilding inoreabbrev THe The inoreabbrev THere There