path: root/vim/config/whitespace.vim
diff options
authorTom Ryder <tom@sanctum.geek.nz>2017-11-11 01:07:14 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-11 01:07:14 +1300
commitaaf04871d944646225875d5e9cc31a967947c3fe (patch)
tree787efb73dabb6b9cda660ccde51e838b507a3dbd /vim/config/whitespace.vim
parent247b816a891162fe28b5e2f8a675435efbd71a12 (diff)
parentca7f441951b85595969eb0842f90784502fc2cc7 (diff)
downloaddotfiles-0.13.0.tar.gz (sig)
Merge branch 'release/v0.13.0'v0.13.0
* release/v0.13.0: (30 commits) Bump version number to 0.13.0 Move mutt_mail.vim line select logic into plugin Add new mail_mutt.vim plugin, apply mappings Sort 'shortmess' flag settings alphabetically Add 'o' and 'O' back into 'shortmess' Set up individual flags for 'shortmess' Fix oii(1df) so it works as a pipe Use exists+ test rather than exists& Adjust some whitespace and comment layout Move matchit.vim sourcing into plugin.vim Rename netrw.vim to plugin.vim Remove 'shellslash' setting Move fedora.vim into os.vim Remove 'tildeop' setting Rearrange three smaller files into display.vim Move 'paste' options into terminal.vim Move wildmenu config into completion.vim Rename complete.vim to completion.vim Rename term.vim to terminal.vim Rename yank.vim to registers.vim ...
Diffstat (limited to 'vim/config/whitespace.vim')
1 files changed, 33 insertions, 0 deletions
diff --git a/vim/config/whitespace.vim b/vim/config/whitespace.vim
index 24cda107..12d41a4e 100644
--- a/vim/config/whitespace.vim
+++ b/vim/config/whitespace.vim
@@ -1,2 +1,35 @@
+" Adopt the indent of the last line on new lines; interestingly, plugins that
+" do clever things with indenting will often assume this is set
+set autoindent
+" Use spaces instead of tabs
+set expandtab
+" Indent with four spaces when an indent operation is used
+set shiftwidth=4
+" Insert four spaces when Tab is pressed
+set softtabstop=4
+" Indent intelligently to 'shiftwidth' at the starts of lines with Tab, but
+" use 'tabstop' everywhere else
+set smarttab
+" When indenting lines with < or >, round the indent to a multiple of
+" 'shiftwidth', so even if the line is indented by one space it will indent
+" up to 4 and down to 0, for example
+set shiftround
+" Don't join lines with two spaces at the end of sentences; I don't two-space,
+" despite the noble Steve Losh's exhortations
+set nojoinspaces
+" Rebind normal J to run plugin-defined join that doesn't jump around, but
+" only if we have the eval feature, because otherwise this mapping won't exist
+" and we should keep the default behaviour
+if has('eval')
+ nmap J <Plug>FixedJoin
" \x strips trailing whitespace via a custom plugin
nmap <Leader>x <Plug>StripTrailingWhitespace