-
Notifications
You must be signed in to change notification settings - Fork 0
/
general.vim
71 lines (56 loc) · 1.55 KB
/
general.vim
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
70
71
let mapleader=","
let maplocalleader=','
set number
set ruler
set lbr
set laststatus=2
set hidden
set modeline
set title
set guicursor=n-v-c-sm:block,i-ci-ve:ver25-blinkon100,r-cr-o:hor20
set foldmethod=indent
set foldcolumn=2
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set list
set showbreak=↪\
set listchars=tab:→\ ,trail:·,extends:⟩,precedes:⟨
set sidescroll=1
set nowrap
set splitright
set noea
set diffopt+=vertical
set inccommand=nosplit
set incsearch
set hlsearch
set ignorecase
set smartcase
set showcmd
set wildmenu
set wildignore+=*.zip,*.gz,*.bz2,*.xz,*.class
set backspace=indent,eol,start
set mouse=a
set backup
set undofile "so is persistent undo ...
set undolevels=1000 "maximum number of changes that can be undone
set undoreload=10000 "maximum number lines to save for undo on a buffer reload
if has('nvim')
set undodir=$HOME/.nvim/.cache/undo//
set backupdir=$HOME/.nvim/.cache/backup//
set directory=$HOME/.nvim/.cache/swap//
set viewdir=$HOME/.nvim/.cache/views//
"silent execute '!mkdir -p $HOME/.nvim/.cache/{backup,swap,views,undo}'
else
set undodir=$HOME/.vim/.cache/undo//
set backupdir=$HOME/.vim/.cache/backup//
set directory=$HOME/.vim/swap//
set viewdir=$HOME/.vim/.cache/views//
silent execute '!mkdir -p $HOME/.vim/.cache/backup'
silent execute '!mkdir -p $HOME/.vim/.cache/swap'
silent execute '!mkdir -p $HOME/.vim/.cache/views'
silent execute '!mkdir -p $HOME/.vim/.cache/undo'
endif
au BufWinLeave * silent! mkview
au BufWinEnter * silent! loadview