196:bd14782d12cf
Anton Shestakov <av6@dwimlabs.net>, Fri, 10 Jul 2020 21:17:24 +0800
.vimrc: better comment for better indentation

next change 202:efa1b684a3ce
previous change 194:bcdbd8cfe8b7

.vimrc

Permissions: -rw-r--r--

Other formats: Feeds:
execute pathogen#infect()
set encoding=utf-8
set history=700
set undolevels=700
set mouse=a
set backspace=2
set scrolloff=4
set sidescrolloff=4
set clipboard=unnamed
set hidden
set nobackup
set nowritebackup
set noswapfile
set wildignore+=*.pyc
set wildmode=list:longest
set autoread
set showcmd
set hlsearch
set incsearch
set ignorecase
set smartcase
set sessionoptions=buffers
set nowrap " don't automatically wrap on load
set textwidth=79 " width of document (used by gd)
set formatoptions-=t " don't automatically wrap text when typing
set formatoptions+=j " remove comment leader when joining lines
set tabstop=8
set softtabstop=4
set shiftwidth=4
set shiftround " round indent to multiples of shiftwidth (for > and <)
set expandtab
set listchars=tab:>-,trail:·,nbsp:⍽
set number " show line numbers
set laststatus=2 " always show status line
set ttimeoutlen=0 " eliminate delay after <ESC>
set t_Co=256
set background=dark
set colorcolumn=80
highlight ColorColumn ctermbg=233
set pastetoggle=<F2>
let mapleader=","
map <Leader>n :bprevious<CR>
map <Leader>m :bnext<CR>
map <Leader>l <C-^>
map <Leader>p :CtrlPBuffer<CR>
" smart home
noremap <expr> <silent> <Home> col('.') == match(getline('.'),'\S')+1 ? '0' : '^'
imap <silent> <Home> <C-O><Home>
" yank to EOL
map Y y$
" don't leave visual mode after shifting
vnoremap < <gv
vnoremap > >gv
" bubble lines
nnoremap <C-Up> :move .-2<CR>
nnoremap <C-Down> :move .+1<CR>
vnoremap <C-Up> :move '<-2<CR>gv
vnoremap <C-Down> :move '>+1<CR>gv
imap <C-Up> <C-O><C-Up>
imap <C-Down> <C-O><C-Down>
" show listchars
nnoremap <F3> :setlocal list! list?<CR>
imap <F3> <C-O><F3>
" show column
nnoremap <F4> :setlocal cursorcolumn! cursorcolumn?<CR>
imap <F4> <C-O><F4>
vmap <F4> <Esc><F4>gv
syntax on
filetype plugin indent on
" airline
let g:airline_left_sep=''
let g:airline_right_sep=''
let g:airline_theme='powerlineish'
" ctrlp
let g:ctrlp_max_height=30
let g:ctrlp_custom_ignore='\v[\/](venv|node_modules|\.(git|hg|svn))$'
" syntastic
let g:syntastic_check_on_open=1
let g:syntastic_auto_loc_list=1
let g:syntastic_enable_signs=1
let g:syntastic_enable_highlighting=1
let g:syntastic_html_checkers=["jshint"]
let g:syntastic_html_jshint_exec="~/node_modules/jshint/bin/jshint"
let g:syntastic_python_checkers=["pyflakes"]
let g:syntastic_lua_checkers=["luac", "luacheck"]
let g:syntastic_lua_luacheck_exec="~/.luarocks/bin/luacheck"
let g:syntastic_javascript_checkers=["jshint"]
let g:syntastic_javascript_jshint_exec="~/node_modules/jshint/bin/jshint"
au FileType python call s:check_if_python3()
fun! s:check_if_python3()
if getline(1) =~ '#!.*\<python3\>'
let g:syntastic_python_checkers=["pyflakes3"]
endif
endfun
" signify
let g:signify_vcs_list = ["git", "hg"]
" vim-ansible
let g:ansible_attribute_highlight="ab"
let g:ansible_extra_keywords_highlight=1
" molokai color scheme
let g:molokai_original=1
colorscheme molokai
hi MatchParen term=bold cterm=bold ctermfg=208 ctermbg=none