From 92c075c41b975f6512609b57b965ce755bcca4b6 Mon Sep 17 00:00:00 2001 From: Zev Averbach Date: Wed, 13 Oct 2021 21:08:55 +0000 Subject: [PATCH] a lot of new niecties from a previous vimrc --- vimrc | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/vimrc b/vimrc index ba86828..2c23fd0 100644 --- a/vimrc +++ b/vimrc @@ -6,6 +6,15 @@ set confirm " prevent the 'no write since last change' message when changing buffers set hidden +"-- Find -- +set path=** "set find path to current directory +set suffixesadd=.py,.html,.css,.js,.scss,.less "add sufixes so you don't have to type whole filenames + +"-- Autocomplete on command mode -- +set wildmode=full "autocomplete filenames, help, etc. +set wildmenu "shows autocomplete options in a nice menu list +set wildignore=*.swp,*.bak,*.pyc "ignore certain file types in autocompletion + " Reopen the last edited position in files au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif @@ -21,10 +30,41 @@ set relativenumber " four-space tabs filetype indent plugin on set smartindent +set autoindent + +set title " set the terminal title +set ruler "show status line +set rulerformat=%10(%l,%c%V%) +set laststatus=2 "always show status line +set cursorline "highlight current line + +set ignorecase "case-insensitive search +set smartcase "unless there's an uppercase letter in the keyword setlocal shiftwidth=2 softtabstop=2 expandtab au FileType python setl softtabstop=4 shiftwidth=4 tabstop=4 +" toggle paste mode +map p :set invpaste + +" keep visual selection after indenting +vnoremap < >gv + +" easier completion mode +imap + +" quick way to escape insert mode +inoremap kj +inoremap + +" make jump you to the matching bracket in normal or visual modes +nnoremap % +vnoremap % + +" easier way to get to beginning end of line +map H ^ +map L $ let mapleader = "\" " toggle comment