-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
71 lines (53 loc) · 1.74 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
syntax on
set number
set autoindent
filetype plugin indent on
set tabstop=2 shiftwidth=2 expandtab smarttab
" Vim Plug Section
call plug#begin(expand('~/.vim/plugged'))
" Nord colorscheme
" Plug 'arcticicestudio/nord-vim'
"Gruvbox theme
Plug 'morhetz/gruvbox'
" Vim airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" File navigation
Plug 'scrooloose/nerdtree'
"A plugin of NERDTree showing git status
Plug 'Xuyuanp/nerdtree-git-plugin'
" HTML5 syntax support
Plug 'othree/html5.vim'
" HTML autocomplete (like emmet)
Plug 'rstacruz/sparkup'
"HTML autoclose tag
Plug 'vim-scripts/HTML-AutoCloseTag'
" Multiple syntax support
Plug 'sheerun/vim-polyglot'
" Git Support ti Vim
Plug 'tpope/vim-fugitive'
" Code completion
"if has('nvim')
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
"else
" Plug 'Shougo/deoplete.nvim'
" Plug 'roxma/nvim-yarp'
" Plug 'roxma/vim-hug-neovim-rpc'
"endif
"let g:deoplete#enable_at_startup = 1
call plug#end()
" Set colorscheme
colorscheme gruvbox
set background=dark " Setting dark mode
" Set powerline font support to airline
let g:airline_powerline_fonts = 1
" Open a NERDTree automatically when vim starts up if no files were specified
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" Open NERDTree automatically when vim starts up on opening a directory
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
" Map a specific shortcut to open NERDTree (Ctrl + n)
map <C-n> :NERDTreeToggle<CR>
" Map Ctrl + Alt + N shortcut to focus NERDTree
map <C-A-n> :NERDTreeFocus<CR>