summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2019-05-27 22:33:13 -0500
committerDanny Holman <dholman@gymli.org>2019-05-27 22:33:13 -0500
commiteadc12ac9016422586c91ab1aadb669eacc3c888 (patch)
treeeb5b67e7ca085b2705897473164034d92ab264d9
parent48ea632e741dcd831df456fca993e33b47a81aa9 (diff)
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.
-rw-r--r--.vimrc14
1 files changed, 11 insertions, 3 deletions
diff --git a/.vimrc b/.vimrc
index 5476042..a89318f 100644
--- a/.vimrc
+++ b/.vimrc
@@ -34,6 +34,9 @@ vnoremap <C-c> "*y
map <silent><Leader>p :set paste<CR>o<esc>"*]p:set nopaste<cr>"
map <silent><Leader><S-p> :set paste<CR>O<esc>"*]p:set nopaste<cr>"
+" 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=`[<C-o>
noremap P P=`[<C-o>
-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 <Up> <Nop>
no <Down> <Nop>
no <Left> <Nop>
no <Right> <Nop>
+no <Delete> <Nop>
ino <Up> <Nop>
ino <Down> <Nop>
ino <Left> <Nop>
ino <Right> <Nop>
+ino <Delete> <Nop>
vno <Up> <Nop>
vno <Down> <Nop>
vno <Left> <Nop>
vno <Right> <Nop>
+vno <Delete> <Nop>
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
nmap <Leader>s :source ~/.vimrc
nmap <Leader>v :e ~/.vimrc
+nnoremap <silent> <Leader>a :LinuxCodingStyle<cr>
let mapleader = " "
" Email options