-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
134 lines (114 loc) · 3.84 KB
/
.vimrc
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
runtime! debian.vim
filetype off " required by vundle
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'morhetz/gruvbox'
Plugin 'suan/vim-instant-markdown', {'rtp': 'after'}
Plugin 'chrisbra/colorizer'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'terminalnode/sway-vim-syntax'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
"let g:airline_theme='base16_monokai'
" Gruvbox options
" see https://github.com/morhetz/gruvbox
set background=dark " Setting dark mode
let g:gruvbox_contrast_dark='hard'
let g:gruvbox_number_column='blue'
let g:gruvbox_imporeved_strings=1
colorscheme gruvbox
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
if has("syntax")
syntax on
endif
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
if has("autocmd")
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
set mouse= " Disable mouse usage
set laststatus=2 " Always show status bar
"set showtabline=2 " Always show tabs
scriptencoding utf-8
set encoding=utf-8
set listchars=tab:▸\ ,trail:·
""" Custom backup and swap files
let myVimDir = expand("$HOME/.vim")
let myBackupDir = myVimDir . '/backup'
let mySwapDir = myVimDir . '/swap'
function! EnsureDirExists (dir)
if !isdirectory(a:dir)
call mkdir(a:dir,'p')
endif
endfunction
call EnsureDirExists(myVimDir)
call EnsureDirExists(myBackupDir)
call EnsureDirExists(mySwapDir)
set backup
set backupskip=/tmp/*
set backupext=.bak
let &directory = mySwapDir
let &backupdir = myBackupDir
set writebackup
""" statusline
" cf the default statusline: %<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
" format markers:
" %< truncation point
" %n buffer number
" %f relative path to file
" %m modified flag [+] (modified), [-] (unmodifiable) or nothing
" %r readonly flag [RO]
" %y filetype [ruby]
" %= split point for left and right justification
" %-35. width specification
" %l current line number
" %L number of lines in buffer
" %c current column number
" %V current virtual column number (-n), if different from %c
" %P percentage through buffer
" %) end of width specification
set statusline=%<\ %n:%f\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)
""" folding
set foldmethod=indent
set foldenable
highlight Folded ctermfg=DarkGreen ctermbg=Black
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
"set number
:nmap <C-N><C-N> :set invnumber<CR>
:highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=Black gui=NONE guifg=DarkGrey guibg=Black
" air-line
"set t_Co=256
"set laststatus=2
"let g:airline_powerline_fonts = 1
"let g:airline#extensions#tabline#enabled = 1
set tabpagemax=300