-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_vimrc
More file actions
80 lines (67 loc) · 1.34 KB
/
dot_vimrc
File metadata and controls
80 lines (67 loc) · 1.34 KB
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
" Syntax
syntax on
" Better find
set path+=**
" Indenting
set autoindent
" Search
set incsearch
set hlsearch
set ignorecase
set smartcase
" Statusline
set laststatus=2
set ruler
set showcmd
set wildmenu
" transparent status line
hi StatusLine ctermbg=NONE cterm=NONE
" Theming
" highlight Normal guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
set background=dark
try
colorscheme vim
catch
endtry
" Various, selfexplanatory
set nofixendofline
set cursorline
set number
set showmode
set ttyfast
set backspace=indent,eol,start
set confirm
set nostartofline
map <SPACE> <leader>
" Set tab
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
" Mouse enable
set mouse=a
" Folding
set foldmethod=indent
set foldlevelstart=100
map <tab> za
set exrc
" Filetype build remap
autocmd FileType c,cpp map <C-m> :make<cr>
autocmd FileType rust map <C-m> :!cargo build<cr>
" Remaps
map <C-s> :w<cr>
map <C-q> :q<cr>
map <C-x> :x<cr>
map <C-h> :tabprevious<cr>
map <C-l> :tabnext<cr>
" remap j and k to better handle lines spanning multiple lines
noremap j gj
noremap k gk
" Emulate spacemacs
map <leader>fs :w<cr>
map <leader>bd :q<cr>
map <leader>wh :tabprevious<cr>
map <leader>wl :tabnext<cr>
map <leader>wd :q<cr>
" Set clipboard to system clipboard
set clipboard+=unnamedplus
filetype on
filetype plugin on
filetype plugin indent on " required