|
| 1 | +call plug#begin('~/.vim/plugged') |
| 2 | + |
| 3 | +Plug 'pangloss/vim-javascript' |
| 4 | +Plug 'mxw/vim-jsx' |
| 5 | +Plug 'chase/vim-ansible-yaml' |
| 6 | +Plug 'bling/vim-airline' |
| 7 | +Plug 'Raimondi/delimitMate' |
| 8 | +Plug 'hail2u/vim-css3-syntax' |
| 9 | +" Plug 'othree/svg-properties-syntax.vim' |
| 10 | +Plug 'othree/html5.vim' |
| 11 | +Plug 'ap/vim-css-color' |
| 12 | +Plug 'gcorne/vim-sass-lint' |
| 13 | +Plug 'ntpeters/vim-airline-colornum' |
| 14 | +Plug 'AndrewRadev/splitjoin.vim' |
| 15 | + |
| 16 | +Plug 'MarcWeber/vim-addon-mw-utils' |
| 17 | +" Plug 'tomtom/tlib_vim' |
| 18 | +Plug 'activebridge/rails-snippets' |
| 19 | +Plug 'honza/vim-snippets' |
| 20 | +Plug 'p0deje/vim-ruby-interpolation' |
| 21 | +Plug 'mg979/vim-visual-multi', { 'branch': 'master' } |
| 22 | + |
| 23 | +Plug 'tpope/vim-rails' |
| 24 | +Plug 'tpope/vim-endwise' |
| 25 | +Plug 'tpope/vim-ragtag' |
| 26 | +Plug 'tpope/vim-haml' |
| 27 | +Plug 'tpope/vim-commentary' |
| 28 | + |
| 29 | +Plug 'vim-scripts/grep.vim' |
| 30 | +Plug 'vim-scripts/EasyGrep' |
| 31 | +Plug 'vim-scripts/LargeFile' |
| 32 | +Plug 'vim-scripts/L9' |
| 33 | +Plug 'vim-scripts/Toggle' |
| 34 | +Plug 'vim-scripts/surround.vim' |
| 35 | +Plug 'vim-scripts/rainbow-end' |
| 36 | +Plug 'vim-scripts/vim-qf' |
| 37 | + |
| 38 | +Plug 'w0rp/ale' |
| 39 | +Plug 'ctrlpvim/ctrlp.vim' |
| 40 | +Plug 'mhinz/vim-startify' |
| 41 | +Plug 'preservim/nerdtree' |
| 42 | + |
| 43 | +Plug 'airblade/vim-localorie' |
| 44 | +Plug 'airblade/vim-gitgutter' |
| 45 | + |
| 46 | +Plug 'joshdick/onedark.vim' |
| 47 | +Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} |
| 48 | +Plug 'miyakogi/conoline.vim' |
| 49 | + |
| 50 | +call plug#end() |
| 51 | + |
| 52 | +colorscheme onedark |
| 53 | +set guifont=Monospace:h13 " Font |
| 54 | + |
| 55 | +set number |
| 56 | +set expandtab ts=2 sw=2 ai " Two spaces instead tab |
| 57 | +set nobackup " Don't make a backup before overwriting a file. |
| 58 | +set nowritebackup " And again. |
| 59 | +set noswapfile |
| 60 | +set list |
| 61 | +set listchars=trail:• " Show spaces in end of line |
| 62 | +set clipboard=unnamedplus |
| 63 | +set scrolloff=10 " Show 3 lines of context around the cursor. |
| 64 | + |
| 65 | +set autoread |
| 66 | +au FocusGained * :checktime |
| 67 | + |
| 68 | +map gitk :!gitk %:p &<cr><ESC> |
| 69 | +
|
| 70 | +map <C-s> :w<cr> |
| 71 | +imap <C-s> <ESC>:w<cr> |
| 72 | +map <C-a> <esc>ggVG<end> |
| 73 | +vnoremap < <gv |
| 74 | +vnoremap > >gv |
| 75 | +
|
| 76 | +" Bubble single&multiple lines |
| 77 | +vnoremap <A-Up> <esc>`<gv:m '<-2<cr>gv |
| 78 | +vnoremap <A-Down> <esc>`>gv:m '>+1<cr>gv |
| 79 | +nnoremap <A-Up> mz:m-2<cr>`z |
| 80 | +nnoremap <A-Down> mz:m+<cr>`z |
| 81 | +
|
| 82 | +" ALE |
| 83 | +let g:ale_fix_on_save = 1 |
| 84 | +let g:lint_on_insert_leave = 1 |
| 85 | +let g:lint_on_text_changed = 0 |
| 86 | +" let g:ale_sign_column_always=1" |
| 87 | +" |
| 88 | +" Rgrep |
| 89 | +map <C-f> :Rgrep<cr> |
| 90 | +let Grep_Default_Filelist = '*.*' |
| 91 | +let Grep_Skip_Files = '*.log *.sql *.png *.jpg *.jpeg *.gif' |
| 92 | +let Grep_Skip_Dirs = '.git tmp coverage log solr public _site node_modules' |
| 93 | + |
| 94 | +" CtrlP |
| 95 | +let g:ctrlp_map = '<A-o>' |
| 96 | +let g:ctrlp_custom_ignore = '\v[\/](\.git|\.hg|\.svn|tmp|coverage|log|node_modules)$' |
| 97 | +let g:ctrlp_match_window = 'top,order:ttb,min:1,max:15,results:15' |
| 98 | + |
| 99 | +" Highlight cursor (only for current window) |
| 100 | +let g:conoline_auto_enable = 1 |
| 101 | +let g:conoline_use_colorscheme_default_normal=1 |
| 102 | +let g:conoline_use_colorscheme_default_insert=1 |
| 103 | + |
| 104 | +nnoremap <silent> <S-tab> :CtrlPBuffer<CR> |
| 105 | +
|
| 106 | +" Commentary |
| 107 | +map <C-c> <esc>gcc<end> |
| 108 | +map <C-x> <esc>gcu<end> |
| 109 | +vmap <C-c> gc |
| 110 | +map cp "+y<CR> |
| 111 | +
|
| 112 | +" NERDTree |
| 113 | +map <F2> :NERDTreeToggle<cr> |
| 114 | +map gt :NERDTreeFind<cr> |
| 115 | +let NERDTreeAutoDeleteBuffer = 1 |
| 116 | + |
| 117 | +" GitGutter |
| 118 | +set updatetime=100 |
| 119 | +let g:gitgutter_map_keys = 0 |
| 120 | + |
| 121 | +" Rails |
| 122 | +map gV :Eview<CR> |
| 123 | +map gC :Econtroller<CR> |
| 124 | +map gM :Emodel<CR> |
| 125 | +map gH :Ehelper<CR> |
| 126 | +map gJ :Ejavascript<CR> |
| 127 | +map gS :Estylesheet<CR> |
| 128 | +
|
| 129 | +" vim-localorie |
| 130 | +nnoremap <silent> lt :call localorie#translate()<CR> |
| 131 | +autocmd CursorMoved *.yml echo localorie#expand_key() |
| 132 | + |
| 133 | +autocmd BufWritePre *.* :%s/\s\+$//e |
| 134 | + |
| 135 | +cmap <S-Insert> <C-R>+ |
| 136 | +
|
| 137 | +if exists("+undofile") |
| 138 | + set udf |
| 139 | + set undodir=~/.vim/undo |
| 140 | +endif |
0 commit comments