dotfiles/.vimrc

78 lines
2.7 KiB
VimL
Raw Normal View History

set nocompatible
filetype off
2015-10-11 17:02:15 +02:00
" Install all plugins:
2023-06-04 14:01:50 +02:00
" $ vim +PlugInstall
call plug#begin('~/.vim/plugged')
Plug 'bling/vim-airline' " Lean & mean status/tabline for vim that's light as air.
Plug 'antoyo/vim-licenses' " Vim Plugin that Provides Commands to Add Licenses at the Top of the Buffer.
Plug 'sjl/badwolf' " A Vim color scheme.
Plug 'rust-lang/rust.vim' " Vim configuration for Rust.
Plug 'cespare/vim-toml' " Vim syntax for TOML.
Plug 'editorconfig/editorconfig-vim' " EditorConfig plugin
Plug 'Yggdroot/indentLine' " Display thin vertical lines at each indentation level
2023-07-26 20:34:19 +02:00
Plug 'leafOfTree/vim-vue-plugin' " Vim syntax and indent plugin for .vue files.
2024-06-30 13:50:41 +02:00
Plug 'leafOfTree/vim-svelte-plugin' " Vim syntax and indent plugin for .svelte files.
2023-06-04 14:01:50 +02:00
call plug#end()
2015-10-11 17:02:15 +02:00
syntax on " Enable syntax highlighting.
colorscheme badwolf " Select the theme.
2015-10-11 17:02:15 +02:00
filetype plugin indent on " Load the plugin and indent file depending on the file type.
set expandtab " Use spaces instead of tabs.
2021-02-28 12:19:27 +01:00
set tabstop=4 " Number of spaces that a <Tab> in the file counts for.
2015-10-11 17:02:15 +02:00
set softtabstop=4 " Number of spaces that a <Tab> counts for while performing editing operations.
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
set laststatus=2 " Always display the status line.
set number " Show line numbers.
set cursorline " Highlight current line
set wildmenu " Visual autocomplete for command menu
set lazyredraw " Redraw only when we need to.
set showmatch " Highlight matching [{()}]
2022-10-14 18:46:08 +02:00
set mouse= " Disable mouse support
2015-10-11 17:02:15 +02:00
set incsearch " Search as characters are entered.
set hlsearch " Highlight matches.
" Turn off search highlight with <leader><space>.
nnoremap <leader><space> :nohlsearch<CR>
" Move vertically by visual line.
nnoremap j gj
nnoremap k gk
2015-10-11 21:48:23 +02:00
" Fix a rendering issue with terminals without the bce capability
" https://sw.kovidgoyal.net/kitty/faq.html#using-a-color-theme-with-a-background-color-does-not-work-well-in-vim
let &t_ut=''
2015-10-11 21:48:23 +02:00
" Licenses
let g:licenses_copyright_holders_name = $USER_NICKNAME
let g:licenses_authors_name = $USER_NICKNAME
2015-10-20 18:05:42 +02:00
let g:licenses_default_commands = ['affero', 'apache', 'bsd3', 'cecill', 'gfdl', 'gpl', 'gplv2', 'isc', 'lgpl', 'mit', 'mpl', 'verbatim']
2019-04-07 00:17:00 +02:00
2021-01-18 22:48:43 +01:00
2019-04-07 00:17:00 +02:00
" Line number modes
:set number relativenumber
:augroup numbertoggle
: autocmd!
: autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
: autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
:augroup END
2021-01-18 22:48:43 +01:00
2023-06-04 14:21:52 +02:00
" indentLine
2022-10-15 21:16:42 +02:00
let g:indentLine_char = '⦙'
2023-06-04 14:21:52 +02:00
let g:indentLine_setConceal = 0
2022-10-15 21:16:42 +02:00
2021-01-18 22:48:43 +01:00
" Tera templates
autocmd BufNewFile,BufRead *.tera set syntax=htmldjango