From eadc12ac9016422586c91ab1aadb669eacc3c888 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Mon, 27 May 2019 22:33:13 -0500 Subject: Changed vim config to be more project-specific Changed the indentation settings in Vim config to match my own coding style by default, but use Linux's when in the kernel directory. --- .vimrc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.vimrc b/.vimrc index 5476042..a89318f 100644 --- a/.vimrc +++ b/.vimrc @@ -34,6 +34,9 @@ vnoremap "*y map p :set pasteo"*]p:set nopaste" map :set pasteO"*]p:set nopaste" +" Disable folding +set nofoldenable + " Turn off swap files set noswapfile set nobackup @@ -47,12 +50,13 @@ set shiftwidth=8 set softtabstop=8 set tabstop=8 set expandtab - +filetype plugin on +filetype indent on noremap p p=`[ noremap P P=`[ -filetype plugin on -filetype indent on +" Per-project indentation +au BufRead,BufEnter ~/repositories/linux/*.{c,h} set noexpandtab set nowrap set linebreak @@ -82,20 +86,24 @@ no no no no +no ino ino ino ino +ino vno vno vno vno +vno nnoremap nnoremap nnoremap nnoremap nmap s :source ~/.vimrc nmap v :e ~/.vimrc +nnoremap a :LinuxCodingStyle let mapleader = " " " Email options -- cgit v1.2.3