Files
dotfiles/vim/vimrc

92 lines
2.2 KiB
VimL

call plug#begin('~/.vim/plugged')
Plug 'altercation/vim-colors-solarized'
Plug 'tpope/vim-fugitive'
Plug 'vim-perl/vim-perl'
Plug 'nvie/vim-flake8'
Plug 'tpope/vim-surround'
Plug 'mileszs/ack.vim'
Plug 'xolox/vim-misc'
Plug 'xolox/vim-notes'
" On-demand
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'bufexplorer.zip', { 'on': 'BufExplorer' }
Plug 'kien/ctrlp.vim', { 'on': 'CtrlP' }
call plug#end()
" BMS =========================================================================
set hidden " Hides buffers instead of closing
set nowrap " don't wrap lines
set tabstop=4
set backspace=indent,eol,start " Prevent weird characters when hit backspace
set autoindent " copy indent from current line when starting new line
set copyindent " copy the structure of existing lines indent when autoindenting
set shiftwidth=4
set expandtab
set showmatch
set ignorecase " Ignore case in patter match
set smartcase " Cancel Ignore case if pattern contains upper case char
set smarttab " When using backspace delete's de blanks according to settings
set hlsearch
set incsearch
set history=1000
set undolevels=1000
set wildignore=*.swp,*.bal,*.pyc,*.class " ignore this files when autocomplete
set title " set terminal window title
set visualbell
set noerrorbells " no bells on errors
set nowritebackup
set nobackup
set noswapfile
set pastetoggle=<F2>
set ruler
" When calculating completion, C-n, don't process include files
set complete-=i
" To avoid "Hit ENTER to continue"
set shortmess=at
set cmdheight=2
" Toggle column numbers
set relativenumber
nmap <silent> <C-n> :set invrelativenumber<CR>
nmap <silent> <Leader>h :nohlsearch<CR>
nmap <silent> <Leader>b :BufExplorer<CR>
iabbrev ipdb import ipdb; ipdb.set_trace()
nnoremap <M-Space> :NERDTreeToggle<cr>
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
vnoremap <silent> <Leader>qs di'<ESC>pa'<ESC>
vnoremap <silent> <Leader>qd di"<ESC>pa"<ESC>
vnoremap <silent> <Leader>q( di(<ESC>pa)<ESC>
vnoremap <silent> <Leader>q[ di[<ESC>pa]<ESC>
vnoremap <silent> <Leader>q{ di{<ESC>pa}<ESC>
set bg=light
colorscheme solarized
let g:ctrlp_map = '<F3>'
let g:ctrlp_cmd = 'CtrlP'
let g:bufExplorerSortBy='fullpath'
let g:bufExplorerSplitOutPathName=0
let g:bufExplorerShowRelativePath=1