-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
136 lines (121 loc) · 3.69 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
set nocompatible " be iMproved, required
set backspace=indent,eol,start
" Needed for vundle, will be turned on after vundle inits
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" Good looking bottom :)
Plugin 'bling/vim-airline'
" Rails :/
Plugin 'tpope/vim-rails.git'
" vim ruby support
Plugin 'vim-ruby/vim-ruby'
" Surround your code :)
Plugin 'tpope/vim-surround'
" Every one should have a pair (Autogenerate pairs for {[( )
Plugin 'jiangmiao/auto-pairs'
" Fuzzy finder for vim (CTRL+P)
Plugin 'kien/ctrlp.vim'
" color scheme
Plugin 'zeis/vim-kolor'
" Nerd commenter
Plugin 'scrooloose/nerdcommenter'
" Nerd tree
Plugin 'scrooloose/nerdtree'
" Tabular -- alignment plugin
Plugin 'godlygeek/tabular'
" Whitespace highlighting for vim
Plugin 'ntpeters/vim-better-whitespace'
"" Autocomplete plugin for vim
Plugin 'Valloric/YouCompleteMe'
" Ultisnip engine
Plugin 'SirVer/ultisnips'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
" Nodejs
Plugin 'moll/vim-node'
" Js linting
Plugin 'Shutnik/jshint2.vim'
" Js syntax
Plugin 'jelera/vim-javascript-syntax'
" Auto-complete for js
Plugin 'marijnh/tern_for_vim'
" Fugitive for git
Plugin 'tpope/vim-fugitive'
" Grep
Plugin 'yegappan/grep'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on
" Syntax highlighting and theme
syntax enable
set t_Co=256
let g:kolor_italic=1 " Enable italic. Default: 1
let g:kolor_bold=1 " Enable bold. Default: 1
let g:kolor_underlined=0 " Enable underline for 'Underlined'. Default: 0
let g:kolor_alternative_matchparen=0 " Gray 'MatchParen' color. Default: 0
colorscheme kolor
" Code folding settings
set foldmethod=indent " fold based on indent
set foldnestmax=10 " deepest fold is 10 levels
set nofoldenable " dont fold by default
set foldlevel=1 " this is just what i use
" za - toggles
" zc - closes
" zo - opens
" zR - open all
" zM - close all
" help :folding if you get stuck
" set ruby compiler
autocmd FileType ruby compiler ruby
" enhance YCM JS completion with tern's smarts
autocmd FileType javascript setlocal omnifunc=tern#Complete
" Vim will load/evaluate code in order to provide completions
let g:rubycomplete_buffer_loading = 1
" Vim can parse the entire buffer to add a list of classes to the completion results
let g:rubycomplete_classes_in_global = 1
" omni-completion for vim
set omnifunc=syntaxcomplete#Complete
" Disable tern scratch preview
set completeopt-=preview
set tabstop=2 " number of visual spaces per tab
set expandtab " tabs are spaces
set shiftwidth=2
set number
set cursorline
set smartindent
set wildmenu
set showmatch
set incsearch
set hlsearch
set ignorecase
set cursorcolumn
let mapleader=';'
nmap <tab> <C-W><C-W>
imap jj <Esc>
cmap jj <Esc>
let g:AutoPairsShortcutJump='<leader><leader>'
cmap <leader>p <C-R>"
nmap <leader>q :q<CR>
nmap <leader>t :tabnew<CR>
nmap <leader>w :w<CR>
nmap <leader>rg :Rgrep<CR><C-w><C-R>"<CR><CR><CR>
nmap <leader>z <C-z>
nmap <leader>nt :NERDTreeToggle<CR>
nmap <leader>nh :nohlsearch<CR>
nmap <leader>ee :e#<CR>
nmap <leader>ec :Econtroller<space>
nmap <leader>em :Emodel<space>
nmap <leader>ev :Eview<space>
nmap <leader><down> :resize +2<cr>
nmap <leader><up> :resize -2<cr>
nmap <leader><left> :vertical resize -2<cr>
nmap <leader><right> :vertical resize +2<cr>
" Trigger configuration. Do not use <tab> if you use
" https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<leader><tab>"
let g:UltiSnipsJumpForwardTrigger="<leader><tab>"
let g:UltiSnipsJumpBackwardTrigger="<leader>p<tab>"