Here's my .vimrc file:
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
" "
" .::::. "
" ___________ :;;;;:____________ " " \_________/ ?????L \__________/ " " |.....| ????????> :.......' " " |:::::| $$$$$$"
.:::::::' , "
" ,|:::::| $$$$".:::::::' .OOS. " " ,7D|;;;;;| $$"
.;;;;;;;' .OOO888S. "
" .GDDD|;;;;;| ?.;;;;;;;' .OO8DDDDDNNS. " " 'DDO|IIIII| .7IIIII7' .DDDDDDDDNNNF
"
" 'D|IIIIII7IIIII7' .DDDDDDDDNNNF " " |EEEEEEEEEE7' .DDDDDDDNNNNF
"
" |EEEEEEEEZ' .DDDDDDDDNNNF " " |888888Z' .DDDDDDDDNNNF
"
" |8888Z' ,DDDDDDDNNNNF` "
" |88Z' "DNNNNNNN" "
" '"' "MMMM" "
" "" "
" "
" ___ ____ __ _ _ ________ ___ "
" / | / / / __ ______ __ __ ____ ___ ___ / / ()_ | | / / / |/ / "
" / /| | / / / / / / / __ / / / / / __ / _ / _ / __ / / / / | | / // // /|/ / "
" / ___ |/ / / / // / // / // / / / / / / / /_/ / / ( ) | |/ // // / / / "
" // |/// _, /_/_,/ // //_/_/_,/ /// |/// // "
" // "
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
set nocompatible " required
filetype off " required
set hidden
set showtabline=0
" 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 'gmarik/Vundle.vim'
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
"-------------------=== Code/Project navigation ===-------------
Plugin 'scrooloose/nerdtree' " Project and file navigation
Plugin 'Xuyuanp/nerdtree-git-plugin' " NerdTree git functionality
Plugin 'majutsushi/tagbar' " Class/module browser
Plugin 'vim-ctrlspace/vim-ctrlspace' " Tabs/Buffers/Fuzzy/Workspaces/Bookmarks
Plugin 'mileszs/ack.vim' " Ag/Grep
Plugin 'vim-airline/vim-airline' " Lean & mean status/tabline for vim
Plugin 'vim-airline/vim-airline-themes' " Themes for airline
Plugin 'fisadev/FixedTaskList.vim' " Pending tasks list
Plugin 'yuttie/comfortable-motion.vim' " Smooth scrolling
Plugin 'MattesGroeger/vim-bookmarks' " Bookmarks
Plugin 'thaerkh/vim-indentguides' " Visual representation of indents
Plugin 'neomake/neomake' " Asynchronous Linting and Make Framework
Plugin 'Shougo/deoplete.nvim' " Asynchronous Completion
Plugin 'roxma/nvim-yarp' " Deoplete Dependency #1
Plugin 'roxma/vim-hug-neovim-rpc' " Deoplete Dependency #2
"-------------------=== Other ===-------------------------------
Plugin 'tpope/vim-surround' " Parentheses, brackets, quotes, XML tags, and more
Plugin 'flazz/vim-colorschemes' " Colorschemes
Plugin 'vimwiki/vimwiki' " Personal Wiki
Plugin 'jreybert/vimagit' " Git Operations
Plugin 'kien/rainbow_parentheses.vim' " Rainbow Parentheses
Plugin 'chriskempson/base16-vim' " Base 16 colors
Plugin 'ryanoasis/vim-devicons' " Dev Icons
"-------------------=== Snippets support ===--------------------
Plugin 'garbas/vim-snipmate' " Snippets manager
Plugin 'MarcWeber/vim-addon-mw-utils' " dependencies #1
Plugin 'tomtom/tlib_vim' " dependencies #2
Plugin 'honza/vim-snippets' " snippets repo
"-------------------=== Languages support ===-------------------
Plugin 'scrooloose/nerdcommenter' " Easy code documentation
Plugin 'mitsuhiko/vim-sparkup' " Sparkup(XML/jinja/htlm-django/etc.) support
Plugin 'w0rp/ale'
"-------------------=== Python ===-----------------------------
Plugin 'klen/python-mode' " Python mode (docs, refactor, lints...)
Plugin 'hynek/vim-python-pep8-indent'
Plugin 'mitsuhiko/vim-python-combined'
Plugin 'mitsuhiko/vim-jinja'
Plugin 'jmcantrell/vim-virtualenv'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype on
filetype plugin on
filetype plugin indent on
"=====================================================
"" General settings
"=====================================================
if filereadable(expand("~/.vimrc_background"))
source ~/.vimrc_background
endif
set encoding=utf-8
let base16colorspace=256
set t_Co=256 " 256 colors
set guifont=mononoki\ Nerd\ Font\ 18
colorscheme base16-default-dark " set vim colorscheme
let g:airline_theme='base16_spacemacs' " set airline theme
syntax enable " enable syntax highlighting
set pyxversion=0
let g:loaded_python_provider = 1
set shell=/bin/bash
set number " show line numbers
set ruler
set ttyfast " terminal acceleration
set tabstop=4 " 4 whitespaces for tabs visual presentation
set shiftwidth=4 " shift lines by 4 spaces
set smarttab " set tabs for a shifttabs logic
set expandtab " expand tabs into spaces
set autoindent " indent when moving to the next line while writing code
set cursorline " shows line under the cursor's line
set showmatch " shows matching part of bracket pairs (), [], {}
set enc=utf-8 " utf-8 by default
set nobackup " no backup files
set nowritebackup " only in case you don't want a backup file while editing
set noswapfile " no swap files
set backspace=indent,eol,start " backspace removes all (indents, EOLs, start) What is start?
set scrolloff=20 " let 10 lines before/after cursor during scroll
set clipboard=unnamed " use system clipboard
set exrc " enable usage of additional .vimrc files from working directory
set secure " prohibit .vimrc files to execute shell, create files, etc...
"=====================================================
"" Tabs / Buffers settings
"=====================================================
tab sball
set switchbuf=useopen
set laststatus=2
nmap :bprev
nmap :bnext
nmap q :SyntasticCheck # :bp bd #
"=====================================================
"" Neomake Settings
"=====================================================
call neomake#configure#automake('w')
let g:neomake_open_list = 2
"=====================================================
"" Deoplete Settings
"=====================================================
" Use deoplete.
let g:deoplete#enable_at_startup=1
let g:deoplete#file#enable_buffer_path=1
let g:deoplete#disable_auto_complete=1
let g:deoplete#enable_refresh_always=0
let g:deoplete#max_list = 500
let g:deoplete#max_menu_width = 60
let g:deoplete#tag#cache_limit_size = 0
let g:deoplete#auto_complete_start_length = 999
let g:deoplete#ignore_sources = {}
let g:deoplete#ignore_sources._ = ['tag', 'dictionary', 'member', 'buffer', 'omni', 'around']
set completeopt+=noselect
set cpt-=t
set cpt+=i
"=====================================================
"" Relative Numbering
"=====================================================
nnoremap :set relativenumber!
"=====================================================
"" Search settings
"=====================================================
set incsearch " incremental search
set hlsearch " highlight search results
"=====================================================
"" Comfortable Motion Settings
"=====================================================
let g:comfortable_motion_scroll_down_key = "j"
let g:comfortable_motion_scroll_up_key = "k"
let g:comfortable_motion_no_default_key_mappings = 1
let g:comfortable_motion_impulse_multiplier = 25 " Feel free to increase/decrease this value.
nnoremap :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0) * 2)
nnoremap :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0) * -2)
nnoremap :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0) * 4)
nnoremap :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0) * -4)
"=====================================================
"" AirLine settings
"=====================================================
let g:airline#extensions#tabline#enabled=1
let g:airline#extensions#tabline#formatter='unique_tail'
let g:airline_powerline_fonts=1
"=====================================================
"" TagBar settings
"=====================================================
let g:tagbar_autofocus=0
let g:tagbar_width=42
autocmd BufEnter *.py :call tagbar#autoopen(0)
autocmd BufWinLeave *.py :TagbarClose
nnoremap :TagbarToggle
"=====================================================
"" NERDTree settings
"=====================================================
let NERDTreeIgnore=['.pyc$', '.pyo$', 'pycache$'] " Ignore files in NERDTree
let NERDTreeWinSize=40
autocmd VimEnter * if !argc() | NERDTree | endif " Load NERDTree only if vim is run without arguments
nmap " :NERDTreeToggle
"=====================================================
"" NERDComment Settings
"=====================================================
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
" Use compact syntax for prettified multi-line comments
let g:NERDCompactSexyComs = 1
" Align line-wise comment delimiters flush left instead of following code indentation
let g:NERDDefaultAlign = 'left'
" Set a language to use its alternate delimiters by default
let g:NERDAltDelims_java = 1
" Add your own custom formats or override the defaults
let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } }
" Allow commenting and inverting empty lines (useful when commenting a region)
let g:NERDCommentEmptyLines = 1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1
"=====================================================
"" DevIcon Settings
"=====================================================
" loading the plugin
let g:webdevicons_enable = 1
" adding the flags to NERDTree
let g:webdevicons_enable_nerdtree = 1
" adding to vim-airline's tabline
let g:webdevicons_enable_airline_tabline = 1
" adding to vim-airline's statusline
let g:webdevicons_enable_airline_statusline = 1
" turn on/off file node glyph decorations (not particularly useful)
let g:WebDevIconsUnicodeDecorateFileNodes = 1
" use double-width(1) or single-width(0) glyphs
" only manipulates padding, has no effect on terminal or set(guifont) font
let g:WebDevIconsUnicodeGlyphDoubleWidth = 1
" whether or not to show the nerdtree brackets around flags
let g:webdevicons_conceal_nerdtree_brackets = 0
" the amount of space to use after the glyph character (default ' ')
let g:WebDevIconsNerdTreeAfterGlyphPadding = ' '
" Force extra padding in NERDTree so that the filetype icons line up vertically
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1
" change the default character when no match found
let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = 'ƛ'
" set a byte character marker (BOM) utf-8 symbol when retrieving file encoding
" disabled by default with no value
let g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol = ''
" enable folder/directory glyph flag (disabled by default with 0)
let g:WebDevIconsUnicodeDecorateFolderNodes = 1
" enable open and close folder/directory glyph flags (disabled by default with 0)
let g:DevIconsEnableFoldersOpenClose = 1
" enable pattern matching glyphs on folder/directory (enabled by default with 1)
let g:DevIconsEnableFolderPatternMatching = 1
" enable file extension pattern matching glyphs on folder/directory (disabled by default with 0)
let g:DevIconsEnableFolderExtensionPatternMatching = 0
"=====================================================
"" SnipMate settings
"=====================================================
let g:snippets_dir='~/.vim/vim-snippets/snippets'
"=====================================================
"" Rainbow Parentheses Autoload
"=====================================================
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
"=====================================================
"" Indent Guides Settings
"=====================================================
set listchars=tab:›\ ,trail:•,extends:#,nbsp:.
"=====================================================
"" Python settings
"=====================================================
" python executables for different plugins
let g:pymode_python='python'
" rope
let g:pymode_rope=0
let g:pymode_rope_completion=0
let g:pymode_rope_complete_on_dot=0
let g:pymode_rope_auto_project=0
let g:pymode_rope_enable_autoimport=0
let g:pymode_rope_autoimport_generate=0
let g:pymode_rope_guess_project=0
" documentation
let g:pymode_doc=0
let g:pymode_doc_bind='K'
" lints
let g:pymode_lint=0
" virtualenv
let g:pymode_virtualenv=1
" breakpoints
let g:pymode_breakpoint=1
let g:pymode_breakpoint_key='b'
" syntax highlight
let g:pymode_syntax=1
let g:pymode_syntax_slow_sync=1
let g:pymode_syntax_all=1
let g:pymode_syntax_print_as_function=g:pymode_syntax_all
let g:pymode_syntax_highlight_async_await=g:pymode_syntax_all
let g:pymode_syntax_highlight_equal_operator=g:pymode_syntax_all
let g:pymode_syntax_highlight_stars_operator=g:pymode_syntax_all
let g:pymode_syntax_highlight_self=g:pymode_syntax_all
let g:pymode_syntax_indent_errors=g:pymode_syntax_all
let g:pymode_syntax_string_formatting=g:pymode_syntax_all
let g:pymode_syntax_space_errors=g:pymode_syntax_all
let g:pymode_syntax_string_format=g:pymode_syntax_all
let g:pymode_syntax_string_templates=g:pymode_syntax_all
let g:pymode_syntax_doctests=g:pymode_syntax_all
let g:pymode_syntax_builtin_objs=g:pymode_syntax_all
let g:pymode_syntax_builtin_types=g:pymode_syntax_all
let g:pymode_syntax_highlight_exceptions=g:pymode_syntax_all
let g:pymode_syntax_docstrings=g:pymode_syntax_all
" highlight 'long' lines (>= 80 symbols) in python files
augroup vimrc_autocmds
autocmd!
autocmd FileType python,rst,c,cpp highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python,rst,c,cpp match Excess /%81v.*/
autocmd FileType python,rst,c,cpp set nowrap
autocmd FileType python,rst,c,cpp set colorcolumn=80
augroup END
" code folding
let g:pymode_folding=0
" pep8 indents
let g:pymode_indent=1
" code running
let g:pymode_run=1
let g:pymode_run_bind=''
let g:ale_sign_column_always = 0
let g:ale_emit_conflict_warnings = 0
let g:airline#extensions#ale#enabled = 1
let g:pymode_rope_lookup_project = 0
let g:airline#extensions#tabline#enabled = 1
imap :w:!clear;python %
python3 << EOF
import vim
import git
def is_git_repo():
try:
_ = git.Repo('.', search_parent_directories=True).git_dir
return "1"
except:
return "0"
vim.command("let g:pymode_rope = " + is_git_repo())
EOF
" Toggle between windows
nnoremap
nnoremap
nnoremap
nnoremap
" deoplete tab-complete
inoremap pumvisible() ? "<c-n>" : "<tab>"
" tern
autocmd FileType javascript nnoremap gb :TernDef
" change colour scheme
"colorscheme wombat
":colorscheme molokai
colorscheme Benokai
Plugin 'Shougo/neosnippet.vim'
Plugin 'Shougo/neosnippet-snippets'
let g:neosnippet#enable_completed_snippet = 1
" Plugin key-mappings.
" Note: It must be "imap" and "smap". It uses mappings.
imap (neosnippet_expand_or_jump)
smap (neosnippet_expand_or_jump)
xmap (neosnippet_expand_target)
" SuperTab like snippets behavior.
" Note: It must be "imap" and "smap". It uses mappings.
"imap
" \ pumvisible() ? "<C-n>" :
" \ neosnippet#expandable_or_jumpable() ?
" \ "<Plug>(neosnippet_expand_or_jump)" : "<TAB>"
smap neosnippet#expandable_or_jumpable() ?
\ "<Plug>(neosnippet_expand_or_jump)" : "<TAB>"
" Enable snipMate compatibility feature.
let g:neosnippet#enable_snipmate_compatibility = 1
" Tell Neosnippet about the other snippets
let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets'
Plugin 'Shougo/echodoc.vim'
set cmdheight=2
let g:echodoc_enable_at_startup = 1