blob: 6fe389fe3e0e0d159ea7ec147d5a92191ff5ee5b (
plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
" VIM configuration {{{
" Basic options {{{
syn on
set nu
set background=dark
set nobackup
set nowritebackup
set noswapfile
set noautoindent
set nosmartindent
set tabstop=2
set shiftwidth=2
set expandtab
set mouse=a
set autoread
set nocompatible
set laststatus=2
set shortmess+=I
set ignorecase
set smartcase
set timeoutlen=1000
" }}}
" Leader key {{{
" This one seems handy, but a bit far to type
"let mapleader="-"
" This one is nice, but easier to conflict with text being typed.
"let mapleader=" "
" This one sems handy!
let mapleader=";"
" }}}
" Filetype and syntax handling {{{
" Filetype handling
filetype plugin indent on
" Syntax highlighting
syntax on
" Syntax check
let g:syntastic_mode_map={ 'mode': 'passive',
\ 'active_filetypes': [],
\ 'passive_filetypes': [] }
" }}}
" Folding {{{
" Disabled due to slowness
"set foldmethod=syntax
"set foldlevelstart=99
"let g:sh_fold_enabled=1
"let javaScript_fold=1
"let perl_fold=1
"let php_folding=1
"let r_syntax_folding=1
"let ruby_fold=1
"let sh_fold_enabled=1
"let vimsyn_folding='af'
"let xml_syntax_folding=1
" }}}
" Command mode completion {{{
" See https://stackoverflow.com/questions/526858/how-do-i-make-vim-do-normal-bash-like-tab-completion-for-file-names
"set wildmode=longest,list
set wildmode=longest,list,full
set wildmenu
" }}}
" Disable modelines {{{
"
" https://lwn.net/Articles/20249/
" http://usevim.com/2012/03/28/modelines/
" http://www.techrepublic.com/blog/it-security/turn-off-modeline-support-in-vim/
set nomodeline
set modelines=0
" }}}
" Session management {{{
"
" http://usevim.com/2013/07/05/sessions/
" https://github.com/xolox/vim-session
" https://github.com/tpope/vim-obsession
" http://stackoverflow.com/questions/1642611/how-to-save-a-session-in-vim
" https://bocoup.com/weblog/sessions-the-vim-feature-you-probably-arent-using/
" http://vimdoc.sourceforge.net/htmldoc/usr_21.html#21.4
" https://github.com/xolox/vim-session?tab=readme-ov-file#options
"let g:session_autosave_periodic=1
set sessionoptions-=buffers
set sessionoptions-=blank
set sessionoptions-=resize
set sessionoptions-=winsize
set sessionoptions-=winpos
let g:session_autosave_silent=1
let g:session_autosave='yes'
let g:session_autoload='no'
let g:session_directory='~/.local/share/vim/sessions'
" }}}
|