| 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 | |
| 9 | set ffs=unix |
| 10 | set encoding=utf-8 |
| 11 | set fileencoding=utf-8 |
| 12 | set listchars=eol:¶,tab:>-,space:.,extends:$,precedes:^ |
| 13 | set list |
| 14 | |
| 15 | " tabs are 4 spaces |
| 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 |
| 32 | set mouse=a |
| 33 | |
| 34 | " line numbers |
| 35 | set number |
| 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 |
| 56 |
willpower232 / my.vimrc
Last active 1 month ago
Revision 0e12cb9ac1d913c441c6297e7ed4aac4f4fe9135