scriptencoding utf-8 | set encoding=utf-8 let $BASH_ENV = "~/.bashrc" packadd! matchit set hidden set confirm set belloff=esc set showcmd cmdheight=2 showmode set wildmenu wildmode=list:longest,list:full set history=500 set nobackup nowritebackup noswapfile try set undodir=~/.vim/undodir undofile | catch | endtry nmap s vmap s nmap S vmap S let mapleader= "s" nnoremap v : nnoremap a @ nnoremap A @@ nnoremap u U nnoremap U nnoremap l nmap m :nohlsearchdiffupdate nnoremap o o nnoremap O O nnoremap a for l in [ 'y', 'p', 'P', 'd' ] | for m in [ 'n', 'v' ] execute m.'noremap '.l.' "+'.l | endfor | endfor cabbrev %PWD% execute('pwd') cabbrev %CD% fnameescape(expand('%:p:h')) cabbrev %CW% expand('') set cursorline cursorcolumn set number "foldcolumn=2 set colorcolumn=+1 set breakindent breakindentopt=shift:2 showbreak=↳ set scrolloff=5 sidescrolloff=10 " offset for lines/columns when scrolling set autowrite autoread | autocmd FocusGained,BufEnter *.* checktime set modeline set hlsearch incsearch set smarttab command! -nargs=1 SETtab let &shiftwidth= | let &tabstop= | let &softtabstop= SETtab 4 set showmatch set backspace=indent,eol,start set shiftround autoindent filetype plugin indent on colorscheme codedark if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on") syntax on | endif set list listchars=tab:»·,trail:·,extends:#,nbsp:~,space:· augroup syntax_sync_min_lines autocmd! autocmd Syntax * syn sync minlines=200 augroup END command! -nargs=? SETspell if ==&spelllang || =='' | set spell! | else | set spell | set spelllang= | endif | if &spell | set spelllang | endif command! -nargs=0 SETFOLDregions set foldmethod=marker command! -nargs=1 SETFOLDindent set foldmethod=indent | let &foldlevel= | let &foldnestmax=+1 command! -nargs=* SETFOLDindents set foldmethod=indent | let &foldlevel=split(, ' ')[0] | let &foldnestmax=split(, ' ')[1] set foldmarker=#region,#endregion set viewoptions=cursor,folds augroup remember__view autocmd! autocmd BufWinLeave *.* if &buflisted | mkview | endif autocmd BufWinEnter *.* silent! loadview augroup END inoremap pumvisible() ? "\" : check_back_space() ? "\" : "\" inoremap pumvisible() ? "\" : "\" function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction