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