-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
171 lines (138 loc) · 5.3 KB
/
.vimrc
File metadata and controls
171 lines (138 loc) · 5.3 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
" General settings
syntax enable " syntax highlight
set shell=/bin/bash "This is to make vim function correctly in fish shell
set t_Co=256 " set 256 colors
set number " show line numbers
set ruler
set wildmenu
"set leader key to ,
let mapleader = ","
set tabstop=2 " 4 whitespaces for tabs visual presentation
set shiftwidth=2 " shift lines by 4 spaces
set smarttab " set tabs for a shifttabs logic
set expandtab " expand tabs into spaces
set autoindent " indent when moving to the next line while writing code
set showmatch " shows matching part of bracket pairs (), [], {}
set cursorline " To highlight the current line
set enc=utf-8 " utf-8 by default
set nobackup " no backup files
set nowritebackup " only in case you don't want a backup file while editing
set scrolloff=5 " let 5 lines before/after cursor during scroll
set clipboard=unnamed " use system clipboard
set exrc " enable usage of additional .vimrc files from working directory
set secure
set nocompatible " be improved, required
filetype off " required
set number
set relativenumber
set noshowmode " make vim not show modes
" CUSTOM MAPPINGS____________________________________________________________________
"
" jj to escape
imap jj <Esc>:w<CR>
" map :paste
set pastetoggle=<F2>
"swap between the buffers
map <leader><Tab> :bnext<cr>
map <leader><S-Tab> :bprevious<cr>
" These are the mappings to move to end and the begening of the line i for
" insert mode and n for normal mode mapped to same keys.
nnoremap <C-H> <Home>
nnoremap <C-L> <End>
" These perform navigation when in Insert Mode
inoremap <C-H> <Left>
inoremap <C-J> <Down>
inoremap <C-K> <Up>
inoremap <C-L> <Right>
" Quicker scrolling
noremap <C-J> 7j
noremap <C-K> 7k
" map space to :w jj
noremap <Space> :w<CR>
nnoremap <F5> "=strftime("%c")<CR>P
" This is to add new lines in normal using ff and FF
nmap ff o<Esc>
nmap FF O<Esc>
" This is for inserting semicolon
noremap <leader>; A;<Esc>
inoremap <leader>; <C-o>A;
" This is for easy buffer switching
:nnoremap <F5> :buffers<CR>:buffer<Space>
" CUSTOM MAPPINGS END_______________________________________________________________
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
"PLUGINS_____________________________________________________________________________
Plugin 'flazz/vim-colorschemes'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'scrooloose/nerdtree'
Plugin 'majutsushi/tagbar'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'jiangmiao/auto-pairs'
Plugin 'mattn/emmet-vim'
Plugin 'tpope/vim-commentary'
Plugin 'vimwiki/vimwiki'
Plugin 'tpope/vim-surround'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'morhetz/gruvbox'
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'
Plugin 'noahfrederick/vim-hemisu'
Plugin 'posva/vim-vue'
Plugin 'ervandew/supertab'
Plugin 'alvan/vim-closetag'
Plugin 'NLKNguyen/papercolor-theme'
"END OF PLUGINS_______________________________________________________________________
call vundle#end() " required
filetype plugin indent on " required
" Ctrlp Settings
" ignore the nltk-data documents
" This saves a lot of time using ctrlp
" Do not take this off
let g:ctrlp_custom_ignore = 'nltk_data'
"nerd tree toggle with "
nmap " :NERDTreeToggle /home/sujay/dev<CR>
""" AirLine settings
"let g:airline_theme='wombat'
let g:airline#extensions#tabline#enabled=1
let g:airline#extensions#tabline#formatter='unique_tail'
let g:airline_powerline_fonts=1
let g:airline_section_y = '%{strftime("%a %d-%m %I:%M %p")}'
"shortcut for toggling the tagbar as ,'
nmap <leader>' :TagbarToggle<CR>
" YCM configs
" this makes the preview window auto dissappear
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
set completeopt-=preview
" Gruvbox
" set background=dark
" colorscheme gruvbox " set color scheme
" Paper color theme
set background=light
colorscheme PaperColor
let g:airline_theme='papercolor'
" Snippets
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsSnippetDirectories = ['/home/sujay/UltiSnips', 'UltiSnips']
" Syntatic
let g:syntastic_python_checkers = ['pylint']
let g:syntastic_always_populate_loc_list = 0
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
" Vim-JS Plugin
let g:javascript_plugin_jsdoc = 1
let g:javascript_plugin_ngdoc = 1
let g:javascript_plugin_flow = 1
" Vim-React Plugin
let g:jsx_ext_required = 0
let g:jsx_pragma_required = 1