mirror of
https://github.com/tpope/vim-sensible.git
synced 2025-11-08 11:03:47 -05:00
Initial commit
This commit is contained in:
69
README.markdown
Normal file
69
README.markdown
Normal file
@@ -0,0 +1,69 @@
|
||||
# sensible.vim
|
||||
|
||||
Think of sensible.vim as one step above `'nocompatible'` mode: a universal
|
||||
set of defaults that (hopefully) everyone can agree on.
|
||||
|
||||
* If you're new to Vim, you can install this as a starting point, rather than
|
||||
copying some random vimrc you found.
|
||||
* If you're pair programming and you can't agree on whose vimrc to use, this
|
||||
can be your neutral territory.
|
||||
* If you're administrating a server with an account that's not exclusively
|
||||
yours, you can `scp` this up to make things a bit more tolerable.
|
||||
* If you're troubleshooting a plugin and need to rule out interference from
|
||||
your vimrc, having this installed will ensure you still have some basic
|
||||
amenities.
|
||||
|
||||
## Installation
|
||||
|
||||
If you don't have a preferred installation method, I recommend
|
||||
installing [pathogen.vim](https://github.com/tpope/vim-pathogen), and
|
||||
then simply copy and paste:
|
||||
|
||||
cd ~/.vim/bundle
|
||||
git clone git://github.com/tpope/vim-sensible.git
|
||||
|
||||
## Features
|
||||
|
||||
See the [source][] for the authoritative list of features. (Don't worry, it's
|
||||
mostly `:set` calls.) Here's a taste:
|
||||
|
||||
* `'backspace'`: Backspace through anything in insert mode.
|
||||
* `'incsearch'`: Start searching before pressing enter.
|
||||
* `'listchars'`: Show trailing whitespace.
|
||||
* `'scrolloff'`: Always show at least one line above/below the cursor.
|
||||
|
||||
[source]: https://github.com/tpope/vim-sensible/master/plugin/sensible.vim
|
||||
|
||||
## Contributing
|
||||
|
||||
I want this to be a plugin nobody objects to installing. [Let me know][GitHub
|
||||
issues] if you have any objections to *anything*. There are a handful of
|
||||
settings I figured *might* be controversial, but I included anyways, just to
|
||||
settle the question once and for all. It won't take much persuasion for me to
|
||||
remove them. Everything else is negotiable.
|
||||
|
||||
Feel free to ask a question if you're not sure why I've set something, as I
|
||||
haven't put much effort into documenting that.
|
||||
|
||||
I'm a stickler for [commit messages][], so if you send me a pull
|
||||
request with so much as superfluous period in the subject line, I will
|
||||
close it without so much as a second thought, and save my precious attention
|
||||
for someone who can actually follow directions.
|
||||
|
||||
[GitHub issues]: http://github.com/tpope/vim-sensible/issues
|
||||
[commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
||||
|
||||
## Self-Promotion
|
||||
|
||||
Like sensible.vim? Follow the repository on
|
||||
[GitHub](https://github.com/tpope/vim-sensible). And if
|
||||
you're feeling especially charitable, follow [tpope](http://tpo.pe/) on
|
||||
[Twitter](http://twitter.com/tpope) and
|
||||
[GitHub](https://github.com/tpope).
|
||||
|
||||
This pairs great with [sleuth.vim](https://github.com/tpope/vim-sleuth).
|
||||
|
||||
## License
|
||||
|
||||
Copyright © Tim Pope. Distributed under the same terms as Vim itself.
|
||||
See `:help license`.
|
||||
53
plugin/sensible.vim
Normal file
53
plugin/sensible.vim
Normal file
@@ -0,0 +1,53 @@
|
||||
" sensible.vim - Defaults everyone can agree on
|
||||
" Maintainer: Tim Pope <http://tpo.pe/>
|
||||
|
||||
if exists('g:loaded_sensible') || &compatible
|
||||
finish
|
||||
endif
|
||||
let g:loaded_sensible = 1
|
||||
|
||||
filetype plugin indent on
|
||||
if !exists('g:syntax_on')
|
||||
syntax enable
|
||||
endif
|
||||
|
||||
set backspace=indent,eol,start
|
||||
set showmatch
|
||||
|
||||
set autoindent
|
||||
set smarttab
|
||||
|
||||
set ttimeout
|
||||
set ttimeoutlen=50
|
||||
|
||||
set incsearch
|
||||
set smartcase
|
||||
|
||||
set laststatus=2
|
||||
set ruler
|
||||
set showcmd
|
||||
set wildmenu
|
||||
|
||||
set scrolloff=1
|
||||
set sidescrolloff=5
|
||||
set display+=lastline
|
||||
|
||||
if !&list && &listchars ==# 'eol:$'
|
||||
set list
|
||||
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
||||
if &termencoding ==# 'utf-8' || &encoding ==# 'utf-8'
|
||||
let &listchars = "tab:\u21e5 ,trail:\u2423,extends:\u21c9,precedes:\u21c7,nbsp:\u26ad"
|
||||
let &fillchars = "vert:\u259a,fold:\u00b7"
|
||||
endif
|
||||
endif
|
||||
|
||||
set autoread
|
||||
set fileformats=unix,dos,mac
|
||||
|
||||
set viminfo+=!
|
||||
|
||||
if exists('+undofile')
|
||||
set undofile
|
||||
endif
|
||||
|
||||
" vim:set ft=vim et sw=2:
|
||||
Reference in New Issue
Block a user