107 lines
2.7 KiB
VimL
107 lines
2.7 KiB
VimL
set nocompatible
|
|
filetype off
|
|
|
|
" general settings
|
|
set encoding=utf-8
|
|
let mapleader=","
|
|
set nu
|
|
set laststatus=2
|
|
set hidden
|
|
set incsearch
|
|
|
|
" Indent settings - this is for PEP8 compatibility
|
|
set expandtab
|
|
set autoindent
|
|
set tabstop=4
|
|
set softtabstop=4
|
|
set textwidth=79
|
|
set shiftwidth=4
|
|
set fileformat=unix
|
|
|
|
"highlight cursorline cterm=none ctermbg=darkred ctermfg=white guibg=darkred guifg=white
|
|
hi cursorline cterm=none term=none ctermbg=236
|
|
set cursorline
|
|
|
|
"set highlight cursorcolumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
|
|
nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
|
|
|
|
set showmatch
|
|
let pythong_highlight_all = 1
|
|
syntax on
|
|
|
|
set foldmethod=indent
|
|
set foldlevel=99
|
|
|
|
" specify the location of the splits
|
|
set splitbelow
|
|
set splitright
|
|
|
|
" remap ctrl + hjkl to move between splits
|
|
nnoremap <C-j> <C-W><C-J>
|
|
nnoremap <C-k> <C-W><C-K>
|
|
nnoremap <C-l> <C-W><C-L>
|
|
nnoremap <C-h> <C-W><C-H>
|
|
" use jj to escape insert mode
|
|
inoremap jj <Esc>
|
|
|
|
nnoremap <leader>l :ls<CR>:b<Space>
|
|
nnoremap <Tab> :bnext<CR>
|
|
nnoremap <S-Tab> :bprev<CR>
|
|
|
|
nnoremap <leader>p :CtrlPBuffer<CR>
|
|
nnoremap <space> za
|
|
|
|
|
|
" NERDTree
|
|
map <C-n> :NERDTreeToggle<CR>
|
|
|
|
"airline - show buffers in the tabline if theres only one tab (always)
|
|
let g:airline#extensions#tabline#enabled = 1
|
|
|
|
" set the runtime path to include Vundle and initialize
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
call vundle#begin()
|
|
" " let Vundle manage Vundle, required
|
|
Plugin 'VundleVim/Vundle.vim'
|
|
"
|
|
Plugin 'tpope/vim-fugitive'
|
|
Plugin 'kien/ctrlp.vim'
|
|
Plugin 'scrooloose/nerdtree'
|
|
Plugin 'tmhedberg/SimpylFold'
|
|
Plugin 'vim-scripts/indentpython.vim'
|
|
Plugin 'scrooloose/syntastic'
|
|
" PEP8 checking plugin
|
|
Plugin 'nvie/vim-flake8'
|
|
"Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
|
|
Plugin 'vim-airline/vim-airline'
|
|
Plugin 'vim-airline/vim-airline-themes'
|
|
"Plugin 'klen/python-mode'
|
|
Plugin 'itchyny/calendar.vim'
|
|
Plugin 'davidhalter/jedi-vim'
|
|
Plugin 'tpope/vim-surround'
|
|
|
|
call vundle#end() " required
|
|
filetype plugin indent on " required
|
|
|
|
" "
|
|
" " Brief help
|
|
" " :PluginList - lists configured plugins
|
|
" " :PluginInstall - installs plugins; append `!` to update or just
|
|
" :PluginUpdate
|
|
" " :PluginSearch foo - searches for foo; append `!` to refresh local cache
|
|
" " :PluginClean - confirms removal of unused plugins; append `!` to
|
|
" auto-approve removal
|
|
" "
|
|
" " see :h vundle for more details or wiki for FAQ
|
|
" " Put your non-Plugin stuff after this line
|
|
|
|
"python with virtualenv support
|
|
"py << EOF
|
|
"import os
|
|
"import sys
|
|
"if 'VIRTUAL_ENV' in os.environ:
|
|
" project_base_dir = os.environ['VIRTUAL_ENV']
|
|
" activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
|
|
" execfile(activate_this, dict(__file__=activate_this))
|
|
"EOF
|