-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
78 lines (70 loc) · 1.97 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
let mapleader = " "
nmap <leader>q :q<cr>
nmap <leader>w :w<cr>
nmap <leader>so :so %<cr>
" Insert newline while still in normal mode
nmap <S-o> O<Esc>
nmap <CR> o<Esc>
" Move between windows using tab
nnoremap <tab> <c-w>
nnoremap <tab><tab> <c-w><c-w>
" Change mode with 'jj'
inoremap jj <Esc>
syntax on
filetype plugin on
set fillchars=""
"set textwidth=79
set nowrap
set number relativenumber
highlight LineNr ctermfg=grey
set expandtab
set shiftwidth=2
" set autoindent
" set smartindent
set tabstop=2 " - tabs are at proper location
set expandtab " - don't use actual tab character (ctrl-v)
set shiftwidth=2 " - indenting is 4 spaces
set autoindent " - turns it on
set smartindent " - does the right thing (mostly) in programs
set cindent " - stricter rules for C programs
"Mode Settings
let &t_SI.="\e[5 q" "SI = INSERT mode
let &t_SR.="\e[4 q" "SR = REPLACE mode
let &t_EI.="\e[1 q" "EI = NORMAL mode (ELSE)
"Cursor settings:
" 1 -> blinking block
" 2 -> solid block
" 3 -> blinking underscore
" 4 -> solid underscore
" 5 -> blinking vertical bar
" 6 -> solid vertical bar
" Ps = 0 -> blinking block.
"Ps = 1 -> blinking block (default).
"Ps = 2 -> steady block.
"Ps = 3 -> blinking underline.
"Ps = 4 -> steady underline.
"Ps = 5 -> blinking bar (xterm).
"Ps = 6 -> steady bar (xterm).
" Setup cursor change on insert mode
let &t_SR="\033[3 q" "
let &t_SI="\033[6 q" " start insert mode, blinking underline cursor
let &t_EI="\033[2 q" " end insert mode, blinking block
" reset the cursor on start (for older versions of vim, usually not required)
augroup myCmds
au!
autocmd VimEnter * silent !echo -ne "\e[2 q"
autocmd VimEnter * redraw!
augroup END
" Slow to redram cursor
set ttimeout
set ttimeoutlen=1
set ttyfast
" Use system clipboard
set clipboard=unnamed
" Ctrl + Enter = newline, when not in insert mode
nmap <c-cr> i<cr><Esc>
" Plugins handled by vim-plug
call plug#begin('~/.vim/plugged')
Plug 'lervag/vimtex'
" Initialize plugin system
call plug#end()