-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
54 lines (54 loc) · 983 Bytes
/
Copy path.vimrc
File metadata and controls
54 lines (54 loc) · 983 Bytes
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
set mouse=
" files
set nobackup
set nowritebackup
"" enables filetype detection
filetype plugin on
" search
set hlsearch
set incsearch
set ignorecase
set smartcase
" appearance
syntax on
set background=dark
set linebreak
set colorcolumn=81
set wrap
set linebreak
set list
set listchars=tab:▸\ ,trail:·
set cursorline
set cursorcolumn
highlight CursorColumn ctermbg=Black
" editing: settings
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
set smartindent
" editing: keys
function! SmartHome()
let s:col = col(".")
normal! ^
if s:col == col(".")
normal! 0
endif
endfunction
nnoremap <silent> <Home> :call SmartHome()<CR>
inoremap <silent> <Home> <C-O>:call SmartHome()<CR>
nnoremap j gj
nnoremap <down> gj
nnoremap k gk
nnoremap <up> gk
nnoremap 0 g0
nnoremap $ g$
" shortcuts
"" d/ cancels search highlight
nnoremap <silent> d/ :noh<cr>
" fixes
"" no visual
map Q <Nop>
"" allow indenting #-prefixed lines with smartindent
inoremap # X#