-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc-windows
74 lines (72 loc) · 1.91 KB
/
.vimrc-windows
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
"""""""""""""""""""""""""""""""
" Rudy @rfaile313 Base .vimrc "
" ~~~~~~ 💩 Windows 10 ~~~~~~ "
"""""""""""""""""""""""""""""""
set number
syntax on
colorscheme monokai
"visual menu complete
set wildmenu
"blink cursor instead of beep
set visualbell
"encoding
set encoding=utf-8
"security
set modelines=0
"prevent line wrapping code / etc - comment to change
"set paste
"whitespace
set wrap
set formatoptions=tcqrn1
set tabstop=4
set shiftwidth=4
set softtabstop=4
"cursor
set scrolloff=3
"backspace
set bs=2
set backspace=indent,eol,start
"cursor block visual (stays terminal bar on insert mode)
let &t_SI.="\e[5 q"
let &t_SR.="\e[4 q"
let &t_EI.="\e[1 q"
"line history
set history=500
"ignore case when searching
set ignorecase
"smart case when searching
set smartcase
"highlight search results
set hlsearch
"turn off search highlighting with comma space
nnoremap <silent> ,<space> nohlsearch<CR>
"matching bracket pairs
set showmatch
set mat=2
"remap q to Q (macro)
nnoremap Q q
nnoremap q <Nop>
"Switch window left/right with ctrl left/right
nmap <silent> <C-Right> wincmd l<CR>
nmap <silent> <C-Left> wincmd h<CR>
" Open :Explore iwith ctrl+e in normal mode
nnoremap <silent> <C-E> :Explore<CR>
"dont autocomment
" autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" MULTIPURPOSE TAB KEY
" Indent if we're at the beginning of a line. Else, do completion.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <expr> <tab> InsertTabWrapper()
inoremap <s-tab> <c-n>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" using airline for status bar https//github.com/vim-airline/vim-airline
" let gairline#extensions#ale#enabled = 1