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 list " Enable visibility of spaces and tab characters"
30set listchars=multispace:\ \ ┊ " Set indentation to show a modified pipe"
31set expandtab " Change tabs to spaces"
32set number " Enable line numbers
33set cursorline " Show a line where the cursor is
34set lazyredraw " Don't redraw the screen all the damn time
35set showmatch " Show matching brackets [ ]
36
37" Code folding options
38set foldenable " Eable folding of code blocks
39set foldlevelstart=10 " Expand most folds
40set foldmethod=indent
41
42" Set <space> to open/close folds
43nnoremap <space> za
44
45" :W sudo saves the file
46" (useful for handling the permission-denied error)
47command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
48
49" Load Dracula-Pro Theme
50packadd! dracula_pro
51syntax enable
52let g:dracula_colorterm = 0
53colorscheme dracula_pro
54
55" Allow crosshair cursor highlighting.
56hi CursorLine cterm=NONE ctermbg=0
57hi CursorColumn cterm=NONE ctermbg=0
58nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
59
60" set \<space> to clear search
61nnoremap <leader><space> :nohlsearch<CR>
62
63" make 'j' and 'k' smarter about wrapping lines
64nnoremap j gj
65nnoremap k gk
66
67" disable netrw
68let g:loaded_netrw = 0
69let g:loaded_netrwPlugin = 0