willpower232

willpower232 / my.vimrc

Last active 1 month ago

Like 0

Revision 95cc9753d00c73fd85a25212518177d546b09b93

my.vimrc Raw
1" syntax highlighting
2syntax on
3
4" todo: experiment with colour schemes
5"colorscheme elflord
6
7" might help vim cope with random terminals and colours
8" by reminding it that the background is dark
9set background=dark
10
11"set expandtab converts tabs to spaces
12
13set ffs=unix
14set encoding=utf-8
15set fileencoding=utf-8
16set listchars=eol:¶,tab:>-,space:.,extends:$,precedes:^
17set list
18
19" tabs are 4 spaces
20set tabstop=4
21set softtabstop=4
22
23" when indenting a line with >, you still want four spaces
24set shiftwidth=4
25
26"line number highlighting
27set cursorline
28hi CursorLine cterm=none
29highlight CursorLineNR ctermbg=red
30
31" note that this doesn't work here
32" so have to do the above instead
33"highlight clear CursorLine
34
35" allow mouse to change cursor position
36set mouse=a
37
38" line numbers
39set number
40
41" This block here executes the Vim Explorer on startup, opening the
42" current directory tree in a small pane to the left
43" note that you will have to exit twice to get back to the prompt
44let g:netrw_banner = 0
45let g:netrw_liststyle = 3
46let g:netrw_browse_split = 4
47let g:netrw_altv = 1
48let g:netrw_winsize = 10
49augroup ProjectDrawer
50 autocmd!
51" pipe wincmd w to autofocus the buffer
52" instead of the directory tree
53 autocmd VimEnter * :Vexplore | wincmd w
54augroup END
55
56" use line numbers relative to cursor position
57" set relativenumber
58
59" credit https://dev.to/aturingmachine/how-i-vim-4ha6
60