Last active
February 7, 2023 15:35
-
-
Save WeZZard/587f637189b01c6688e008b8843a69fe to your computer and use it in GitHub Desktop.
vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'dracula/vim', { 'as': 'dracula' } | |
Plug 'vim-syntastic/syntastic' | |
Plug 'keith/swift.vim' | |
Plug 'preservim/nerdtree' | |
" Initialize plugin system | |
call plug#end() | |
syntax enable | |
colorscheme dracula | |
set noexpandtab | |
set copyindent | |
set preserveindent | |
set softtabstop=0 | |
set shiftwidth=2 | |
set tabstop=2 | |
set number | |
set colorcolumn=74,80 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Navigation | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" NERDTree | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
nnoremap <leader>n :NERDTreeFocus<CR> | |
nnoremap <C-n> :NERDTree<CR> | |
nnoremap <C-t> :NERDTreeToggle<CR> | |
nnoremap <C-f> :NERDTreeFind<CR> | |
" Start NERDTree when Vim starts with a directory argument. | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | | |
\ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif | |
" Exit Vim if NERDTree is the only window remaining in the only tab. | |
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment