-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
executable file
·57 lines (45 loc) · 1.32 KB
/
.vimrc
File metadata and controls
executable file
·57 lines (45 loc) · 1.32 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
set number
set wildmenu
syntax on
set clipboard=unnamed " For sharing clipboard with the system
set scrolloff=2 " 2 lines above/below cursor when scrolling
set hlsearch
set autoindent " Copy the same indent from the previous line
set ignorecase smartcase
set incsearch
set showmode
set linebreak
set so=5
" infinite persistent undo
set undofile
set undodir=~/.vim/undodir
" Set different dirs for backup and swap
set backupdir=~/.vim/backup/
set directory=~/.vim/swap/
" Remove highlights with <Ctrl-l>
nnoremap <silent> <C-l> :nohl<CR><C-l>
" Space as leader key
let mapleader=" "
" Bindings
nnoremap <silent> <Leader>s :split<CR>
nnoremap <silent> <Leader>v :vsplit<CR>
nnoremap <silent> <Leader>q :close<CR>
" Commands
command! Jsonformat :%!python -m json.tool
" Plugins
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()
Plug 'dense-analysis/ale'
if (has('nvim'))
Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
endif
Plug 'preservim/nerdtree'
call plug#end()
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>