@@ -40,6 +40,7 @@ filetype plugin indent on " required
4040syntax on " enable syntax highlighting
4141colorscheme desert " set `desert` as default colour scheme
4242set autoindent " indent when moving to the next while writing code
43+ set colorcolumn = 80 " show 80 line indicator
4344set encoding = utf- 8 " show output in UTF-8 as YouCompleteMe requires
4445set expandtab " expand tabs into spaces
4546set fileencoding = utf- 8 " save file with UTF-8 encoding
@@ -50,6 +51,7 @@ set shiftwidth=4 " shift lines by 4 spaces for indent
5051set showmatch " show the matching part of the pair for [] {} & ()
5152set softtabstop = 4 " for easier backspacing the soft tabs
5253set tabstop = 4 " set tabs to have 4 spaces
54+ set tws = 20 x0 " set terminal windows size
5355
5456highlight cursorcolumn cterm= NONE ctermbg= darkgrey ctermfg= white
5557 \ guibg= darkgrey guifg= white
@@ -72,6 +74,14 @@ nnoremap <space> za
7274
7375" plugin settings - NERDTree
7476map <C-\> :NERDTreeToggle<CR>
77+ " open NERDTree automatically when vim starts up with no file specified
78+ autocmd StdinReadPre * let s: std_in= 1
79+ autocmd VimEnter * if argc () == 0 && ! exists (" s:std_in" ) | NERDTree | endif
80+ " close vim if the only window left open is NERDTree
81+ autocmd bufenter * if (winnr (" $" ) == 1 && exists (" b:NERDTree" )
82+ \ && b: NERDTree .isTabTree ()) | q | endif
83+ let NERDTreeShowHidden= 1 " show hidden file by default
84+ let NERDTreeIgnore= [' .git$[[dir]]' , ' .swp' , ' .DS_Store' ]
7585
7686" plugin settings - NERD Commenter
7787map <C-_> <leader> ci
0 commit comments