commit a94d7f86ee234ebca2c1f5ad233274b92e06cd5e
parent 05eec4a581aa2d681b89e33c26c6b54e81a07b28
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Sun, 17 Feb 2019 14:36:04 +0100
Some stuff for best practices
Former-commit-id: 326f07a46ae41607f385c282ba30134bc90ed4fc
Diffstat:
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/vim/editor.vimrc b/vim/editor.vimrc
@@ -2,8 +2,6 @@
" Syntax highlighting
syntax on
-" Filetype-specific indenting
-filetype plugin indent on
" In general, don't want anything concealed
if has('conceallevel')
@@ -30,22 +28,21 @@ endif
set number
set numberwidth=3
-" I want spaces
-set expandtab
" with a smart tab
set smarttab
" and 1 tab == 2 spaces
-set shiftwidth=2 " when >>
-set tabstop=2 " visually
-set softtabstop=2 " and when editing
+set tabstop=8 " always keep ts (visual length of \t) at 8
+set expandtab " use spaces instead of tabs
+set shiftwidth=2 " 2 spaces when >>
+set softtabstop=2 " and when pressing TAB
set shiftround " always shift by multiple of shiftwidth
set copyindent " smart indent based on file
" Auto indent when starting new line
set autoindent
-set smartindent
+filetype plugin indent on
" Folding on indentation
set foldmethod=indent
diff --git a/vim/general.vimrc b/vim/general.vimrc
@@ -56,7 +56,7 @@ colorscheme default
set background=dark
" Enable 256 colormode
-set t_Co=256
+" set t_Co=256
" Mouse tweak
set mousemodel=popup
@@ -96,3 +96,5 @@ if exists("&belloff")
set belloff=showmatch,esc,shell,wildmode,backspace " Disable beeping if no match is found
endif
+" Command-line autocompletion
+set wildmode=longest,list,full
diff --git a/vim/map.vimrc b/vim/map.vimrc
@@ -87,7 +87,7 @@ nnoremap <expr> <silent> 0 col('.') == match(getline('.'),'\S')+1 ? '0' : '^'
nnoremap gV `[v`]
" Delete without yanking to clipboard
-noremap <leader>d "_d
+nnoremap <leader>d "_d
" Change without yanking to clipboard
nnoremap <leader>C "_c