-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
140 lines (123 loc) · 3.93 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
137
138
139
140
" =======================================================================
" General
" =======================================================================
syntax on
let mapleader=","
set number
set mouse=a
set guioptions-=r
set guioptions-=L
set guioptions-=e
set guifont=Monaco:h12
set linespace=2
set hidden
set wrap!
set encoding=utf-8 nobomb
set history=999
set undolevels=999
set nobackup
set nowritebackup
set noswapfile
set laststatus=2
set ai
set lcs=tab:>-,eol:$
set list
set hlsearch ""Continue to highlight searched phrases.
set incsearch ""But do highlight as you type your search.
set ignorecase
set smartcase
set expandtab ""Insert space chars instead of tab
set autoindent smartindent "Make identind stuff easier
set copyindent
set tabstop=4 ""Default number of spaces a tab takes
set shiftwidth=4
set softtabstop=4 ""Allow deletion of whole tabs
set backspace=indent,eol,start
set clipboard+=unnamed
set wildignore=*.o,*.obj,.git,*.png,*.PNG,*.JPG,*.jpg,*.GIF,*.gif,*.pdf,*.PDF,*.pyc,*.swp,*.bak
autocmd Filetype html,htmldjango,eruby,ruby,xml,phtml,ctp set expandtab shiftwidth=2 tabstop=2 softtabstop=2
autocmd Filetype js,javascript,php set expandtab shiftwidth=4 tabstop=4 softtabstop=4
au BufReadPost *.eco set syntax=html
au BufReadPost *.stylus set syntax=css
call pathogen#infect()
"JS Lint
set makeprg=jsl\ -nologo\ -nofilelisting\ -nosummary\ -nocontext\ -conf\ '<DIRECTORY_PATH>/jsl.conf'\ -process\ %
set errorformat=%f(%l):\ %m^M
"Tmux fix
set t_ut=
" =======================================================================
" Mappings
" =======================================================================
imap <C-h> <C-o>h
imap <C-j> <C-o>j
imap <C-k> <C-o>k
imap <C-l> <C-o>l
" Moving selection
xmap <C-k> :mo'<-- <CR> gv
xmap <C-j> :mo'>+ <CR> gv
" Tab indents selection
vmap <silent> <Tab> >gv
" Shift-tab unindents
vmap <silent> <S-Tab> <gv
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <silent> <tab> <C-^>
nnoremap <leader>vrc :e ~/.vimrc<CR>
nnoremap <leader>zsh :e ~/.zshrc<CR>
nnoremap <leader>so :so %<CR>
nnoremap <leader><tab> :NERDTreeToggle<cr>
nnoremap <leader>g :CommandT<cr>
nnoremap <leader>h :CommandTBuffer<cr>
nnoremap <leader>u :GundoToggle<cr>
nnoremap : ;
nnoremap ; :
" Smooth scroll
noremap <silent> <c-u> :call smooth_scroll#up(&scroll, 0, 2)<CR>
noremap <silent> <c-d> :call smooth_scroll#down(&scroll, 0, 2)<CR>
noremap <silent> <c-b> :call smooth_scroll#up(&scroll*2, 0, 4)<CR>
noremap <silent> <c-f> :call smooth_scroll#down(&scroll*2, 0, 4)<CR>
let g:EasyMotion_leader_key = '<Leader>'
" Mapping for emmet trigger
imap hh <C-y>,
" =======================================================================
" Styling
" =======================================================================
colorscheme Tomorrow-Night
"set background=light
let g:airline#extensions#tabline#enabled = 1
let g:airline_left_sep=''
let g:airline_right_sep=''
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
" powerline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
" old vim-powerline symbols
let g:airline_left_sep = '⮀'
let g:airline_left_alt_sep = '⮁'
let g:airline_right_sep = '⮂'
let g:airline_right_alt_sep = '⮃'
let g:airline_symbols.branch = '⭠'
let g:airline_symbols.readonly = '⭤'
let g:airline_symbols.linenr = '⭡'