From 70a1687c7487bbe7397d1db71e04f4cb2380fc27 Mon Sep 17 00:00:00 2001 From: Oxbian Date: Thu, 29 Jun 2023 23:07:21 +0200 Subject: Updating lsp settings & documentation --- .vim/options.vim | 90 +++++--------------------------------------------------- 1 file changed, 8 insertions(+), 82 deletions(-) (limited to '.vim/options.vim') diff --git a/.vim/options.vim b/.vim/options.vim index 29f9f2c..431bfc7 100644 --- a/.vim/options.vim +++ b/.vim/options.vim @@ -9,9 +9,10 @@ set hlsearch " Highlight all match search pattern " Graphics options syntax on " Show syntax color -set background=dark -colorscheme onedark +set background=dark " Set vim style as dark +colorscheme onedark " Set colorscheme as onedark set number " Show line number +set relativenumber " Show relative line number set cursorline " Select the current line set showmatch " Show matching brackets when overred set laststatus =2 " Fix for tabline @@ -38,19 +39,20 @@ set autoread " Automatically read extern changes on the file " System if has('unnamedplus') " ALlow OS & vim clipboard sync - set clipboard = "unnamedplus" + set clipboard = unnamedplus endif set undofile " Save undo history set history =500 " Max line vim remember set updatetime=500 " Delay before vim write swap file, lower better for gitgutter " Autocomplete -set completeopt = "menuone,noselect" " Show a pop up for command completion +set completeopt=menu,menuone,popup,noselect,noinsert " Show a pop up for command completion set wildmenu " Turn on wildmenu " Avoid garbled characters in Chinese language windows OS -let $LANG='en' -set langmenu=en +let $LANG='en' " Setting lang as en +set langmenu=en " Setting menu lang as en +" This delete all the defined menu source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim @@ -71,23 +73,9 @@ set whichwrap+=<,>,h,l " Don't redraw while executing macros (good performance config) set lazyredraw -" For regular expressions turn magic on -set magic - " How many tenths of a second to blink when matching brackets set mat=2 -" No annoying sound on errors -set noerrorbells -set novisualbell -set t_vb= -set tm=500 - -" Properly disable sound on errors on MacVim -if has("gui_macvim") - autocmd GUIEnter * set vb t_vb= -endif - " Add a bit extra margin to the left set foldcolumn=1 @@ -97,69 +85,7 @@ set encoding=utf8 " Use Unix as the standard file type set ffs=unix,dos,mac -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Files, backups and undo -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Turn backup off, since most stuff is in SVN, git etc. anyway... set nobackup set nowb set noswapfile - -" Close the current buffer -map bd :Bclose:tabclosegT - -" Close all the buffers -map ba :bufdo bd - -map l :bnext -map h :bprevious - -" Useful mappings for managing tabs -map tn :tabnew -map to :tabonly -map tc :tabclose -map tm :tabmove -map t :tabnext - -" Let 'tl' toggle between this and the last accessed tab -let g:lasttab = 1 -nmap tl :exe "tabn ".g:lasttab -au TabLeave * let g:lasttab = tabpagenr() - - -" Opens a new tab with the current buffer's path -" Super useful when editing files in the same directory -map te :tabedit =escape(expand("%:p:h"), " ")/ - -" Switch CWD to the directory of the open buffer -map cd :cd %:p:h:pwd - -" Specify the behavior when switching between buffers -try - set switchbuf=useopen,usetab,newtab - set stal=2 -catch -endtry - -" Return to last edit position when opening files (You want this!) -au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif - - -"""""""""""""""""""""""""""""" -" => Status line -"""""""""""""""""""""""""""""" -" Always show the status line -set laststatus=2 - -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Spell checking -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Pressing ,ss will toggle and untoggle spell checking -map ss :setlocal spell! - -" Shortcuts using -map sn ]s -map sp [s -map sa zg -map s? z= - -- cgit v1.2.3