-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
69 lines (52 loc) · 1.52 KB
/
vimrc
File metadata and controls
69 lines (52 loc) · 1.52 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
" show line numbers
set number
" 100 items in history
set history=1000
" show cursor postion
set ruler
" show incomplete commands
set showcmd
" show menu in tab completion
set wildmenu
" keep atleast 15 lines on top when press z + Enter
set scrolloff=15
" highlights the search
set hlsearch
" To move the cursor to the matched string, while typing the search pattern
set incsearch
" Ignore the case while searching
set ignorecase
" Match case if search pattern includes Upper Case
set smartcase
" for wrapping text at the end of line.
set lbr
" auto indent
set ai
" smart indent
set si
" when we shift using < and > width is set to 2
set shiftwidth=2
" tab width set to 2
set tabstop=2
" spaces replace tabs
set expandtab
" information to vim that we are using dark background
set bg=dark
"syntax highlighting
syntax on
" Pathogen
execute pathogen#infect()
colorscheme dracula
" How can I open a NERDTree automatically when vim starts up?
"autocmd vimenter * NERDTree
" Open NERDTree with Ctrl+n
map <C-n> :NERDTreeToggle<CR>
" How can I close vim if the only window left open is a NERDTree?
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
"setting encoding for fonts
set encoding=UTF-8
"Adding custom colors for indent-guides plugin
"Automatically color indentation using indent-guides plugin
let g:indent_guides_auto_colors = 0
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=black ctermbg=0
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=darkgrey ctermbg=1