mauvehed's dotfiles for personal and work environments
1" built with love from
2" - https://github.com/romainl/idiomatic-vimrc
3" - https://linuxhint.com/vimrc_tutorial/
4
5" enable pathogen (plugin manager)
6execute pathogen#infect()
7
8" Enabling filetype support provides filetype-specific indenting,
9" syntax highlighting, omni-completion and other useful settings.
10filetype plugin indent on
11syntax on
12
13" `matchit.vim` is built-in so let's enable it!
14" Hit `%` on `if` to jump to `else`.
15runtime macros/matchit.vim
16
17" various QOL settings
18set autoindent " Minimal automatic indenting for any filetype.
19set backspace=indent,eol,start " Intuitive backspace behavior.
20set hidden " Possibility to have more than one unsaved buffers.
21set incsearch " Incremental search, hit `<CR>` to stop.
22set hlsearch " ???
23set ruler " Shows the current line number at the bottom-right
24 " of the screen.
25set wildmenu " Great command-line completion, use `<Tab>` to move
26 " around and `<CR>` to validate.
27set tabstop=2 " Set tab character to show as 2 spaces
28set softtabstop=2 " Set tab to input 2 spaces
29set shiftwidth=2 " Set shiftwidth to 2 spaces
30set list " Enable visibility of spaces and tab characters"
31set listchars=multispace:\ \ ┊ " Set indentation to show a modified pipe"
32set expandtab " Change tabs to spaces"
33set number " Enable line numbers
34set cursorline " Show a line where the cursor is
35set lazyredraw " Don't redraw the screen all the damn time
36set showmatch " Show matching brackets [ ]
37
38" Code folding options
39set foldenable " Eable folding of code blocks
40set foldlevelstart=10 " Expand most folds
41set foldmethod=indent
42
43" Set <space> to open/close folds
44nnoremap <space> za
45
46" :W sudo saves the file
47" (useful for handling the permission-denied error)
48command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
49
50" Load Dracula-Pro Theme
51packadd! dracula_pro
52syntax enable
53let g:dracula_colorterm = 0
54colorscheme dracula_pro
55
56" Allow crosshair cursor highlighting.
57hi CursorLine cterm=NONE ctermbg=0
58hi CursorColumn cterm=NONE ctermbg=0
59nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
60
61" set \<space> to clear search
62nnoremap <leader><space> :nohlsearch<CR>
63
64" make 'j' and 'k' smarter about wrapping lines
65nnoremap j gj
66nnoremap k gk
67
68" disable netrw
69let g:loaded_netrw = 0
70let g:loaded_netrwPlugin = 0