mirror of https://github.com/nirenjan/dotfiles.git
Move tab expansion to individual ftplugins
Update install script to add the ftplugins and remove the old tab-expand.vim plugin from the installation list.vimbundler
parent
5b5df1b002
commit
1507f357e4
3
install
3
install
|
@ -172,10 +172,11 @@ lnfile vimrc ~/.vimrc
|
||||||
# Install my plugins
|
# Install my plugins
|
||||||
lnfile vim/plugin/long-lines.vim ~/.vim/plugin/long-lines.vim
|
lnfile vim/plugin/long-lines.vim ~/.vim/plugin/long-lines.vim
|
||||||
lnfile vim/plugin/match-brackets.vim ~/.vim/plugin/match-brackets.vim
|
lnfile vim/plugin/match-brackets.vim ~/.vim/plugin/match-brackets.vim
|
||||||
lnfile vim/plugin/tab-expand.vim ~/.vim/plugin/tab-expand.vim
|
|
||||||
|
|
||||||
# Install my filetype plugins
|
# Install my filetype plugins
|
||||||
|
lnfile vim/ftplugin/make.vim ~/.vim/ftplugin/make.vim
|
||||||
lnfile vim/ftplugin/perl.vim ~/.vim/ftplugin/perl.vim
|
lnfile vim/ftplugin/perl.vim ~/.vim/ftplugin/perl.vim
|
||||||
|
lnfile vim/ftplugin/ruby.vim ~/.vim/ftplugin/ruby.vim
|
||||||
|
|
||||||
# Install pathogen
|
# Install pathogen
|
||||||
if [[ ! -f ~/.vim/autoload/pathogen.vim ]]
|
if [[ ! -f ~/.vim/autoload/pathogen.vim ]]
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
" File: make.vim
|
||||||
|
" Author: Nirenjan Krishnan
|
||||||
|
" Description: Makefile editing settings
|
||||||
|
" Last Modified: May 15, 2013
|
||||||
|
|
||||||
|
setlocal tabstop=4
|
||||||
|
setlocal softtabstop=4
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal noexpandtab
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
" File: ruby.vim
|
||||||
|
" Author: Nirenjan Krishnan
|
||||||
|
" Description: Ruby editing settings
|
||||||
|
" Last Modified: May 15, 2013
|
||||||
|
|
||||||
|
setlocal tabstop=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal expandtab
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
" Tabs plugin for vim
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
"
|
|
||||||
" This plugin reconfigures the tab key expansion depending on the language
|
|
||||||
" of the file being edited.
|
|
||||||
"
|
|
||||||
" USAGE:
|
|
||||||
" -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a
|
|
||||||
" 'plugin' directory in some other directory that is in your
|
|
||||||
" 'runtimepath'.
|
|
||||||
"
|
|
||||||
" -- vim 5: Stick this file somewhere and 'source cscope.vim' it from
|
|
||||||
" your ~/.vimrc file (or cut and paste it into your .vimrc).
|
|
||||||
"
|
|
||||||
" NOTE:
|
|
||||||
" Make sure to add individual preferences for the language of your choice.
|
|
||||||
"
|
|
||||||
" Nirenjan Krishnan nirenjan@gmail.com 2013/04/12
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
|
|
||||||
" Default
|
|
||||||
" Tabstop = 4
|
|
||||||
" Soft Tabstop = 4
|
|
||||||
" Shiftwidth = 4
|
|
||||||
" Expand tabs
|
|
||||||
autocmd FileType * set ts=4 sts=4 sw=4 et
|
|
||||||
|
|
||||||
" Ruby
|
|
||||||
" Tabstop = 2, expand
|
|
||||||
autocmd FileType ruby setlocal ts=2 sts=2 sw=2 et
|
|
||||||
|
|
||||||
" Make
|
|
||||||
" Tabstop = 4, No expand tab
|
|
||||||
autocmd FileType make setlocal ts=4 sts=4 sw=4 noet
|
|
||||||
|
|
6
vimrc
6
vimrc
|
@ -6,7 +6,11 @@ call pathogen#infect()
|
||||||
call pathogen#helptags()
|
call pathogen#helptags()
|
||||||
|
|
||||||
" Editing options
|
" Editing options
|
||||||
" These are now handled by the tab-expand plugin
|
" May be overridden by ftplugin
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set expandtab
|
||||||
|
|
||||||
" Disable Ex mode
|
" Disable Ex mode
|
||||||
nnoremap Q <nop>
|
nnoremap Q <nop>
|
||||||
|
|
Loading…
Reference in New Issue