Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " ConEmu fix for 256 colors in Vim
- " and remaps for fixing Windows Vim's weird
- " Backspace behavior
- if !empty($CONEMUBUILD)
- set termencoding=utf8
- set encoding=utf8
- set term=xterm
- set t_Co=256
- let &t_AB="\e[48;5;%dm"
- let &t_AF="\e[38;5;%dm"
- inoremap <Char-0x07F> <BS>
- nnoremap <Char-0x07F> <BS>
- endif
- set nocompatible " Required for Vim to be iMproved, turn off for vi-like usage
- set ignorecase " Ignores case in search
- set smarttab " Improves tabbing
- set autoindent " New lines will be indented as well
- set noshowmode " Disable showmode since Airline shows modes
- set foldmethod=syntax " Set foldmethod for programming
- set shiftwidth=4 " Assits code formatting
- set laststatus=2 " Set Lightline to appear always
- set backspace=2 " Make backspace work like most other apps
- set tabstop=4 " Sets tab to 4 instead of vim's crazy 8
- set nohlsearch " Disable search highlight
- set ttimeoutlen=0 " Solves delay issue when hitting <esc>
- filetype plugin indent on " Sets on filetype (Also from plugins)
- syntax on " Sets on syntax highlighting
- " Plug Manager
- call plug#begin('C:/Users/GVW/vimfiles/plugged')
- Plug 'ctrlpvim/ctrlp.vim' " CtrlP
- Plug 'scrooloose/nerdtree' " NERDTree
- Plug 'godlygeek/tabular' " Tabular
- Plug 'tyrannicaltoucan/vim-deep-space' " Deep-Space Colorscheme
- Plug 'tpope/vim-markdown' " Markdown for VIM
- Plug 'itchyny/lightline.vim' " Lightline
- Plug 'davidhalter/jedi-vim' " Jedi for Python
- Plug 'mattn/webapi-vim' | Plug 'mattn/gist-vim' " Gist for Vim + WebAPI
- Plug 'freitass/todo.txt-vim' " Vim Todo.txt
- Plug 'tpope/vim-surround' " Vim-Surround
- Plug 'tpope/vim-repeat' " Repeat plugins actions with dot
- Plug 'ervandew/supertab' " Supertab (tab completions)
- Plug 'sirver/ultisnips' " UltiSnips
- Plug 'raimondi/delimitmate' " Delimitmate for quote completion
- Plug 'flazz/vim-colorschemes' " Colorschemes
- call plug#end()
- " Set deep-space colorscheme
- colo deep-space
- " SuperTab
- let g:SuperTabDefaultCompletionType = '<C-n>'
- " UltiSnips
- let g:UltiSnipsEditSplit = 'horizontal'
- let g:UltiSnipsSnippetDirectories=["C:/Users/GVW/vimfiles/vim-snippets/"]
- let g:UltiSnipsUsePythonVersion = 3
- " Gist
- let g:gist_use_password_in_gitconfig = 1
- " CtrlP
- let g:ctrlp_cmd = 'CtrlPBuffer'
- let g:ctrlp_by_filename = 1
- let g:ctrlp_working_path_mode = 'r'
- let g:ctrlp_custom_ignore = {
- \ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$',
- \ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
- \}
- " Lightline
- let g:lightline = {
- \ 'colorscheme': 'wombat',
- \ 'mode_map': {
- \ 'n' : 'N',
- \ 'i' : 'I',
- \ 'R' : 'R',
- \ 'v' : 'V',
- \ 'V' : 'VL',
- \ "\<C-v>": 'VB',
- \ 'c' : 'C',
- \ 's' : 'S',
- \ 'S' : 'SL',
- \ "\<C-s>": 'SB',
- \ 't': 'TERM',
- \ },
- \ 'active': {
- \ 'left': [['mode', 'paste'], ['filename'], ['ctrlpmark']],
- \ 'right': []
- \ },
- \ 'component_function': {
- \ 'readonly': 'LightlineReadonly',
- \ 'filename': 'LightlineFilename',
- \ 'ctrlpmark': 'CtrlPMark',
- \ 'mode': 'LightlineMode',
- \ },
- \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
- \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
- \ }
- function! LightlineFilename()
- let fname = expand('%:t')
- return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item :
- \ ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
- \ ('' != fname ? fname : '[No Name]') .
- \ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
- endfunction
- function! LightlineMode()
- let fname = expand('%:t')
- return fname == 'ControlP' ? 'CtrlP' :
- \ fname =~ 'NERD_tree' ? 'NERDTree' :
- \ winwidth(0) > 60 ? lightline#mode() : ''
- endfunction
- function! LightlineModified()
- return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-'
- endfunction
- function! LightlineReadonly()
- return &ft !~? 'help' && &readonly ? "\ue0a2" : ''
- endfunction
- function! CtrlPMark()
- if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item')
- call lightline#link('iR'[g:lightline.ctrlp_regex])
- return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item
- \ , g:lightline.ctrlp_next], 0)
- else
- return ''
- endif
- endfunction
- let g:ctrlp_status_func = {
- \ 'main': 'CtrlPStatusFunc_1',
- \ 'prog': 'CtrlPStatusFunc_2',
- \ }
- function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked)
- let g:lightline.ctrlp_regex = a:regex
- let g:lightline.ctrlp_prev = a:prev
- let g:lightline.ctrlp_item = a:item
- let g:lightline.ctrlp_next = a:next
- return lightline#statusline(0)
- endfunction
- function! CtrlPStatusFunc_2(str)
- return lightline#statusline(0)
- endfunction
- " Remappings
- 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>
- nnoremap <F2> :NERDTreeToggle<CR>
- nnoremap <F3> :Tabularize /"<CR>
- nnoremap <F5> :so $MYVIMRC<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement