From 5c8a2a8504519d43b5b681424b3694dca0418965 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Tue, 24 Jan 2023 22:37:01 +0100 Subject: Use a basic vim instead of Emacs on servers --- tw/home/files/vimrc | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 tw/home/files/vimrc (limited to 'tw/home/files/vimrc') diff --git a/tw/home/files/vimrc b/tw/home/files/vimrc new file mode 100644 index 00000000..ec908792 --- /dev/null +++ b/tw/home/files/vimrc @@ -0,0 +1,57 @@ +let mapleader = "\" +let maplocalleader = "\\" + +set showcmd " show command as they are typed +set showmatch " show matching brackets, briefly jump to matching one +set matchtime=0 " tenths of a sec to jump to matching brackets +set showmode " show NORMAL/INSERT/VISUAL indicator +set ruler " show cursor position +set number " show line numbers +set cursorline " highlight current line +set modeline " check for modelines +set hlsearch " highlight search results +set ignorecase " case-insensitive searching +set smartcase " ...unless query has capital letters +set incsearch " incremental search +set gdefault " :s/search/replace/ has g by default +set magic " use extended regexes +set wildmenu " autocomplete :commands +set nolazyredraw " redraw during macro execution etc. +set foldlevelstart=10 " open most folds by default +set foldmethod=syntax " (or marker, manual, expr, syntax, diff) +set noequalalways " don't resize all windows when closing/opening another +set eadirection=both " 'equalalways' applies horizontally and vertically + +set expandtab " tabs are actually spaces +set tabstop=4 " tab width +set softtabstop=4 " when reading a '\t', it will be this wide +set shiftwidth=4 " autoindent tab width +set list " show whitespace with characters in 'listchars' +" possible chars: eol, tab, space, trail, extends, precedes, conceal, nbsp +set listchars=tab:>\ ,trail:_ " highlight tabs and trailing spaces specially +set showbreak=>\ " character to show at start of wrapped lines +set nojoinspaces " don't add two spaces after [.!?] + +set scrolloff=5 " always show these many lines around the current one +set sidescrolloff=15 " always show these many columns around the current one +set colorcolumn=80 " highlight 80th column +set textwidth=79 " break long lines on whitespace when inserted +set linebreak " wrap by words (affects display only) +set breakindent " wrapped lines have same virtual indent as first line +set formatoptions=tcqn2 " preserve textwidth, comments, allow gq, numbered + " lists, second line indent + +set mouse=a " use mouse in terminal; press shift to disable temporarily +set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50 + \,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor + \,sm:block-blinkwait175-blinkoff150-blinkon175 + +" Fix colours in kitty -- see :help xterm-true-color. +set termguicolors +let &t_8f = "\[38;2;%lu;%lu;%lum" +let &t_8b = "\[48;2;%lu;%lu;%lum" + +filetype on +syntax on + +source ~/.vim/catppuccin.vim -- cgit v1.2.3