Last active
August 21, 2017 20:48
-
-
Save nikneroz/2d54362acf421bad3377f19f7672856a to your computer and use it in GitHub Desktop.
Neovim & MacVim & Gvim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if &compatible | |
set nocompatible | |
endif | |
" Required: | |
set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim | |
set runtimepath+=~/.config/nvim/dein/.cache/vim-airline/ | |
set clipboard=unnamed | |
" Required: | |
if dein#load_state('/home/denis/.config/nvim/dein') | |
call dein#begin('/home/denis/.config/nvim/dein') | |
" Required: | |
call dein#add('/home/denis/.config/nvim/dein/repos/github.com/Shougo/dein.vim') | |
" Syntax checker | |
call dein#add('scrooloose/syntastic') | |
" Vim eco-system: | |
call dein#add('ctrlpvim/ctrlp.vim') | |
call dein#add('vim-airline/vim-airline') | |
call dein#add('vim-airline/vim-airline-themes') | |
call dein#add('scrooloose/nerdtree') | |
" call dein#add('terryma/vim-multiple-cursors') | |
call dein#add('airblade/vim-gitgutter.git') | |
call dein#add('kana/vim-fakeclip') | |
" Autocomplete | |
call dein#add('Shougo/deoplete.nvim') | |
call dein#add('Shougo/neosnippet.vim') | |
call dein#add('Shougo/neosnippet-snippets') | |
" Utils for development | |
call dein#add('tpope/vim-surround') | |
call dein#add('tpope/vim-commentary') | |
call dein#add('mileszs/ack.vim') | |
" Syntax plugins | |
call dein#add('elzr/vim-json') | |
call dein#add('slim-template/vim-slim') | |
call dein#add('kchmck/vim-coffee-script') | |
call dein#add('plasticboy/vim-markdown') | |
call dein#add('elixir-lang/vim-elixir') | |
call dein#add('pangloss/vim-javascript') | |
call dein#add('mxw/vim-jsx') | |
" Themes | |
call dein#add('fatih/molokai') | |
call dein#add('notpratheek/vim-luna') | |
call dein#add('flazz/vim-colorschemes') | |
call dein#add('xolox/vim-misc') | |
call dein#add('xolox/vim-colorscheme-switcher') | |
call dein#add('altercation/vim-colors-solarized') | |
" Required: | |
call dein#end() | |
call dein#save_state() | |
endif | |
" Required: | |
filetype plugin indent on | |
syntax enable | |
set undofile | |
set undodir=~/.config/nvim/undodir | |
" If you want to install not installed plugins on startup. | |
if dein#check_install() | |
call dein#install() | |
endif | |
set encoding=utf-8 | |
set termencoding=utf-8 | |
set backupcopy=yes | |
set hlsearch | |
set backspace+=start,eol,indent | |
set number | |
set smartindent | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set guifont=Inconsolata\ for\ Powerline:h16 | |
set fillchars+=stl:\ ,stlnc:\ | |
set laststatus=2 | |
set lazyredraw | |
set lz | |
set colorcolumn=120 | |
set hid | |
set re=1 | |
au BufNewFile,BufRead *.json.jbuilder set ft=ruby | |
au BufNewFile,BufRead *.slim set filetype=slim | |
" Favorite themes: iceberg hybrid solarized bvemu busybee monokai Molokai wombat256mod Tomorrow-Night up lilypink 256-grayvim 256-jungle babymate256 blacklight 1989 | |
colorscheme up | |
"+ AIRLINE | |
" Avaliable themes: 'wombat' 'solarized' 'molokai' 'tomorrow' 'base16' | |
let g:airline_theme='wombat' | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#branch#enabled = 1 | |
let g:airline#extensions#branch#empty_message = 'No branch!' | |
let g:airline#extensions#branch#use_vcscommand = 0 | |
let g:airline#extensions#branch#displayed_head_limit = 10 | |
" Config for nonexistent powerline fonts | |
" if !exists('g:airline_symbols') | |
" let g:airline_symbols = {} | |
" endif | |
" unicode symbols | |
" let g:airline_symbols.crypt = '#' | |
" let g:airline_symbols.readonly = 'READONLY' | |
" let g:airline_symbols.linenr = 'LINE' | |
" let g:airline_symbols.maxlinenr = ' MAX' | |
" let g:airline_symbols.branch = '∫' | |
" let g:airline_symbols.paste = 'ρ' | |
" let g:airline_symbols.whitespace = 'Ξ' | |
" Disable color switcher default mappings | |
let g:colorscheme_switcher_define_mappings=0 | |
" Enable autocomplete | |
let g:deoplete#enable_at_startup = 1 | |
" + Syntax | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_loc_list_height = 5 | |
let g:syntastic_auto_loc_list = 0 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 1 | |
let g:syntastic_javascript_checkers = ['eslint'] | |
let g:syntastic_javascript_eslint_exec = './node_modules/.bin/eslint' | |
" let g:syntastic_error_symbol = '●' | |
" let g:syntastic_style_error_symbol = '☻' | |
" let g:syntastic_warning_symbol = '☕' | |
" let g:syntastic_style_warning_symbol = '☺' | |
highlight link SyntasticErrorSign SignColumn | |
highlight link SyntasticWarningSign SignColumn | |
highlight link SyntasticStyleErrorSign SignColumn | |
highlight link SyntasticStyleWarningSign SignColumn | |
let g:jsx_ext_required = 0 | |
" - Syntax | |
" yank | |
let g:unite_source_history_yank_enable = 1 | |
" Поиск по файлам | |
if executable('ag') | |
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' | |
let g:ctrlp_use_caching = 0 | |
let g:ackprg = 'ag --vimgrep' | |
endif | |
"+ Multiple cursors | |
" let g:multi_cursor_quit_key = '<C-[>' | |
" let g:multi_cursor_exit_from_insert_mode = 0 | |
"- Multiple cursors | |
" | |
":nmap - Display normal mode maps | |
":imap - Display insert mode maps | |
":vmap - Display visual and select mode maps | |
":smap - Display select mode maps | |
":xmap - Display visual mode maps | |
":cmap - Display command-line mode maps | |
":omap - Display operator pending mode maps | |
nnoremap K :Ack! "\b<C-R><C-W>\b"<CR>:cw<CR> " Search by word under cursor | |
nnoremap <C-y> :reg<cr> " Show yank history | |
let mapleader = "\<Space>" | |
nmap <Leader>, <c-w>< | |
nmap <Leader>. <c-w>> | |
nmap <Leader>= <c-w>+ | |
nmap <Leader>- <c-w>- | |
"+ ColorTheme Switch | |
nnoremap <Leader>p :NextColorScheme<cr> | |
nnoremap <Leader>o :PrevColorScheme<cr> | |
"- ColorTheme Switch | |
" + Buffers switch | |
nnoremap <Leader>[ :bprevious<cr> | |
nnoremap <Leader>] :bnext<cr> | |
" - Buffers switch | |
" + Open NerdTree | |
nmap <c-i> :NERDTreeToggle<cr> | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" - Open NerdTree | |
autocmd BufWritePre * %s/\s\+$//e | |
"+ Expand neosnippet inside of Deoplete autocomplete | |
nmap <c-j> <c-w>j | |
nmap <c-k> <c-w>k | |
nmap <c-h> <c-w>h | |
nmap <c-l> <c-w>l | |
"+ Expand neosnippet inside of Deoplete autocomplete | |
"+ Expand neosnippet inside of Deoplete autocomplete | |
imap <C-k> <Plug>(neosnippet_expand_or_jump) | |
smap <C-k> <Plug>(neosnippet_expand_or_jump) | |
xmap <C-k> <Plug>(neosnippet_expand_target) | |
"- Expand neosnippet inside of Deoplete autocomplete | |
hi ColorColumn term=reverse cterm=reverse ctermbg=gray |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment