Skip to content

Instantly share code, notes, and snippets.

@mortymacs
Last active February 25, 2018 08:50
Show Gist options
  • Save mortymacs/3c4177f42893dfc0aab3aebfe14e15e7 to your computer and use it in GitHub Desktop.
Save mortymacs/3c4177f42893dfc0aab3aebfe14e15e7 to your computer and use it in GitHub Desktop.
My vim config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" My plugins
Plugin 'majutsushi/tagbar'
Plugin 'scrooloose/nerdtree'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'mkitt/tabline.vim'
Plugin 'terryma/vim-smooth-scroll'
Plugin 'airblade/vim-gitgutter'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'easymotion/vim-easymotion'
Plugin 'davidhalter/jedi-vim'
Plugin 'wincent/terminus'
Plugin 'cocopon/iceberg.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" 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
" Default config
syntax on
set nu
set mouse=""
" Change theme
colorscheme iceberg
" Cursorline
set cursorline
highlight CursorLine term=None cterm=None ctermbg=234
" Tagbar
nmap <F3> :TagbarToggle<CR>
" Nerdtree
map <F2> :NERDTreeToggle<cr>
let g:NERDTreeIgnore=['\.pyc$', '\~$', 'venv', '.git', '__pycache__', '.tags']
let g:NERDTreeDirArrows=1
let g:nerdtree_tabs_focus_on_files=1
let g:NERDTreeFileExtensionHighlightFullName = 1
let g:NERDTreeExactMatchHighlightFullName = 1
let g:NERDTreePatternMatchHighlightFullName = 1
" let g:NERDTreeMapOpenInTab='<C><ENTER>'
"autocmd VimEnter * NERDTree
"autocmd BufEnter * NERDTreeMirror
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
" Airline
let g:airline_theme='minimalist'
" Windows border config
highlight VertSplit ctermfg=None ctermbg=None cterm=None
" Tab
hi TabLine ctermfg=White ctermbg=235 cterm=NONE
hi TabLineFill ctermfg=White ctermbg=235 cterm=NONE
hi TabLineSel ctermfg=White ctermbg=238 cterm=NONE
map <M-Left> :tabprevious<CR>
map <M-Right> :tabnext<CR>
map <C-o> :tabe
map <C-w> :tabclose<CR>
" Moving among windows
nnoremap <C-S-Down> <C-W><C-J>
nnoremap <C-S-Up> <C-W><C-K>
nnoremap <C-S-Right> <C-W><C-L>
nnoremap <C-S-Left> <C-W><C-H>
" Moving among buffers
map bt :bn<cr>
map bp :bn<cr>
map bd :bd<cr>
map bq :b#\|bd#<cr>
" Scroll
noremap <silent> <C-Up> :call smooth_scroll#up(&scroll, 0, 2)<CR>
noremap <silent> <C-Down> :call smooth_scroll#down(&scroll, 0, 2)<CR>
" CtrlP
map <Tab><Tab> :CtrlP<CR>
set wildignore+=*/.git/*,*.pyc,*/__pycached__/*,*.pyo,*.pyd,*/venv/*
" Commenting current line
map ## <leader>c<space>
" Jedi
let g:jedi#goto_command = "<C-d>"
let g:jedi#goto_definitions_command = "<C-S-d>"
" Set column layout
let file_name = expand('%:e')
if file_name == "py"
highlight OverLength ctermbg=black ctermfg=white guibg=#444444
match OverLength /\%81v.\+/
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment