" " ~/.vimrc " set nocompatible set hidden set ruler set visualbell set noerrorbells set nostartofline set t_vb= set autoindent set backspace=2 set ttimeoutlen=100 set shiftwidth=2 set tabstop=2 set expandtab set hlsearch set laststatus=2 set undolevels=1000 set nobackup if exists('&undodir') | set undodir= | end set noswapfile set noundofile set nowritebackup set viminfo= syntax on nnoremap Y y$ if exists("&cryptmethod") set cm=blowfish2 end if exists("&autochdir") set autochdir end nnoremap gb :bnext<cr> nnoremap gB :bprev<cr> nnoremap <leader>a :ls<cr>:b<space> nnoremap <leader>/ :noh<cr> set clipboard=unnamed,exclude:linux\|cons nnoremap <silent> <leader>c \ :if stridx(&clipboard, 'unnamedplus', 0) == 0 \ \| let &clipboard = substitute(&clipboard, 'unnamedplus', 'unnamed', '') \ \| echo 'Selection: primary' \ \| else \ \| let &clipboard = substitute(&clipboard, 'unnamed', 'unnamedplus', '') \ \| echo 'Selection: clipboard' \ \| end \ <cr> set pastetoggle=<leader>q hi StatusLine term=reverse,bold cterm=none ctermbg=none ctermfg=lightgrey hi StatusLineNC term=reverse cterm=none ctermbg=none autocmd BufWinEnter * match ErrorMsg /\%>80v.\%<83v/ autocmd BufWritePre * if !&bin | %s/\s\+$//ge | end autocmd BufEnter * if &ft == 'help' | wincmd o | end