dotfiles/vim/.vimrc

64 lines
1.6 KiB
VimL
Raw Normal View History

2019-02-10 11:29:26 +00:00
set nocompatible " be iMproved, required
" filetype off " required
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
2019-02-10 11:29:26 +00:00
so ~/.vim/plugins.vim
map <C-n> :NERDTreeToggle<CR>
set laststatus=2
set noshowmode
2019-02-10 13:19:07 +00:00
set showmatch
set ignorecase
set smartcase
" Allow backspacing over autoindent, line breaks and start of insert action
set backspace=indent,eol,start
" When opening a new line and no filetype-specific indenting is enabled, keep
" the same indent as the line you're currently on. Useful for READMEs, etc.
set autoindent
" Stop certain movements from always going to the first character of a line.
" While this behaviour deviates from that of Vi, it does what most users
" coming from other editors would expect.
set nostartofline
" Display the cursor position on the last line of the screen or in the status
" line of a window
set ruler
" Enable use of the mouse for all modes
set mouse=a
2019-02-10 13:19:07 +00:00
let g:lightline = {
\ 'colorscheme': 'srcery_drk',
\ }
inoremap " ""<left>
inoremap ' ''<left>
inoremap ( ()<left>
inoremap [ []<left>
inoremap < <><left>
inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O
2019-02-10 13:19:07 +00:00
set number
syntax on
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif