-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
72 lines (59 loc) · 1.55 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
" https://github.com/yak6/dotfiles
" Plugins
call plug#begin()
Plug 'tpope/vim-sensible'
Plug 'jiangmiao/auto-pairs'
Plug 'sheerun/vim-polyglot'
call plug#end()
" Moving selected text up/down (Shift + J/K)
vnoremap <S-J> :m '>+1<CR>gv=gv
vnoremap <S-K> :m '<-2<CR>gv=gv
" Moving selected text left/right (Shift + H/L)
vnoremap <S-H> <gv
vnoremap <S-L> >gv
" Delete word before cursor (Ctrl + W)
nnoremap <C-w> db
" Delete word after cursor (Ctrl + Q)
nnoremap <C-q> daw
" Basic
syntax enable
set number
set relativenumber
set cursorline
" Status bar
set statusline=[\%F\]\%m\ [%{&fileencoding}\]\ [%{&fileformat}\]\ [\%p%%\]\ [%{getcwd()}]
set laststatus=2
" Tab settings
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smartindent
" Apperance
hi LineNr ctermfg=244 cterm=bold
hi StatusLine ctermfg=white ctermbg=232 cterm=NONE gui=NONE
hi CursorLineNr gui=bold cterm=bold ctermfg=white
hi CursorLine cterm=NONE gui=NONE
" Editing
set nobackup
set noswapfile
set mouse=a
set hlsearch
" Other
set incsearch
set ignorecase
set smartcase
set splitright
set splitbelow
set wildmode=longest,list,full
set wrap
set linebreak
set formatoptions+=t
autocmd FileType make setlocal noexpandtab
" Cursor
" With this option, when running in terminal emulator your cursor will change depending on current editing mode.
if has('gui_running') || &term =~ 'xterm'
let &t_SI = "\e[6 q" " Insert mode - beam cursor '▏'
let &t_SR = "\e[4 q" " Replace mode – underline cursor '▁'
let &t_EI = "\e[2 q" " Normal mode – block cursor '█'
endif