chore: update install script
This commit is contained in:
123
install.sh
123
install.sh
@@ -1,97 +1,84 @@
|
||||
#!/bin/bash
|
||||
|
||||
# configure vim bundles
|
||||
VIM_BUNDLES=(
|
||||
'git://github.com/msanders/snipmate.vim.git'
|
||||
'git://github.com/scrooloose/syntastic.git'
|
||||
'git://github.com/altercation/vim-colors-solarized.git'
|
||||
'git://github.com/tpope/vim-surround.git'
|
||||
)
|
||||
|
||||
# check for git
|
||||
GIT=$(which git)
|
||||
if [ ! $? == 0 ]; then
|
||||
echo "You must install git and add it to you PATH"
|
||||
exit 1
|
||||
fi
|
||||
ROOT=`pwd`
|
||||
ROOT="$(pwd)"
|
||||
|
||||
# pre-run cleanup
|
||||
rm -rf bash/bash_magic vim/bundle/* "${HOME}"/.vimrc
|
||||
|
||||
###
|
||||
# bash
|
||||
# shell
|
||||
###
|
||||
# clone bash_magic repo
|
||||
if [ ! -d bash/bash_magic ]; then
|
||||
$GIT clone git://github.com/w33ble/bash_magic.git bash/bash_magic
|
||||
fi
|
||||
|
||||
# install select bash magic scripts
|
||||
mkdir -p "${HOME}/bin" "${HOME}/.bash_aliases.d" "${HOME}/.bash_completion.d" "${HOME}/.bash_functions.d"
|
||||
# check for zsh, perform setup if it exists
|
||||
ZSH="$(which zsh)"
|
||||
if [ ! $? == 0 ]; then
|
||||
echo "Zsh not found, skipping shell setup"
|
||||
else
|
||||
echo "Zsh found, setting it as default shell"
|
||||
chsh -s $ZSH
|
||||
|
||||
cd "${ROOT}/bash/bash_magic/bash_aliases.d";
|
||||
for i in color refresh git less dev sublime docker misc; do cp "${i}.sh" "${HOME}/.bash_aliases.d"; done
|
||||
cd "${ROOT}/bash/bash_magic/bash_completion.d";
|
||||
for i in etc; do cp "${i}.sh" "${HOME}/.bash_completion.d"; done
|
||||
cd "${ROOT}/bash/bash_magic/bash_functions.d";
|
||||
for i in completion extract lsbytes lsnew vim; do cp "${i}.sh" "${HOME}/.bash_functions.d"; done
|
||||
|
||||
# install custom bash scripts
|
||||
# cp "${ROOT}/bash/bash_aliases.d/"*.sh "${HOME}/.bash_aliases.d"
|
||||
# cp "${ROOT}/bash/bash_completion.d/"*.sh "${HOME}/.bash_completion.d"
|
||||
# cp "${ROOT}/bash/bash_functions.d/"*.sh "${HOME}/.bash_functions.d"
|
||||
|
||||
# set up the bash_profile file
|
||||
cp "${ROOT}/bash/bash_profile" "${HOME}"/.bash_profile
|
||||
|
||||
# add bash_magic logic to bash profile
|
||||
cat "${ROOT}/bash/bash_magic/bashrc" >> "${HOME}"/.bash_profile
|
||||
if [ ! -f "${HOME}"/.bashrc ]; then
|
||||
ln -s "${HOME}"/.bash_profile "${HOME}"/.bashrc
|
||||
# install zimfw
|
||||
echo "Install zimfw?"
|
||||
read zfw
|
||||
if [ "$zfw" == "y" ]; then
|
||||
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
|
||||
fi
|
||||
fi
|
||||
|
||||
###
|
||||
# dotfiles
|
||||
###
|
||||
|
||||
cd "${ROOT}/dotfiles"
|
||||
for i in *; do
|
||||
cp "${i}" "${HOME}/.${i}"
|
||||
done
|
||||
cd "${ROOT}"
|
||||
# check for dotfiles, copy them to home
|
||||
if [ -d "${ROOT}/dotfiles" ]; then
|
||||
cd "${ROOT}/dotfiles" || exit
|
||||
for i in *; do
|
||||
# check if file exists, if so skip the copy
|
||||
if [ -f "${HOME}/.${i}" ]; then
|
||||
echo "File ${HOME}/.${i} already exists, skipping copy"
|
||||
else
|
||||
cp "${i}" "${HOME}/.${i}"
|
||||
fi
|
||||
done
|
||||
cd "${ROOT}" || exit
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
# git
|
||||
###
|
||||
|
||||
# collect git user info, create config file
|
||||
echo -n "Enter your git name: "
|
||||
read NAME
|
||||
echo -n "Enter you git email: "
|
||||
read EMAIL
|
||||
echo -e "[user]\n\tname = ${NAME}\n\temail = ${EMAIL}" > "${HOME}"/.gitconfig
|
||||
# check for git
|
||||
GIT=$(which git)
|
||||
if [ ! $? == 0 ]; then
|
||||
echo "git not found, skipping git setup"
|
||||
else
|
||||
# add custom config and helpers
|
||||
cat "${ROOT}"/git/gitconfig >> "${HOME}"/.gitconfig
|
||||
cp "${ROOT}"/git/githelpers "${HOME}"/.githelpers
|
||||
|
||||
# add custom config and helpers
|
||||
cat "${ROOT}"/git/gitconfig >> "${HOME}"/.gitconfig
|
||||
cp "${ROOT}"/git/githelpers "${HOME}"/.githelpers
|
||||
# collect git user info, create config file
|
||||
echo "Enter you git auth details?"
|
||||
read GIT_AUTH
|
||||
if [ "$GIT_AUTH" == "y" ]; then
|
||||
echo -n "Enter your git name: "
|
||||
read NAME
|
||||
echo -n "Enter you git email: "
|
||||
read EMAIL
|
||||
git config --global user.name "${NAME}"
|
||||
git config --global user.email "${EMAIL}"
|
||||
fi
|
||||
fi
|
||||
|
||||
###
|
||||
# vim
|
||||
###
|
||||
|
||||
# clone bundle repos
|
||||
echo "${ROOT}/vim/bundle"
|
||||
cd "${ROOT}/vim/bundle"
|
||||
pwd
|
||||
|
||||
for b in ${VIM_BUNDLES[@]}; do
|
||||
$GIT clone "${b}"
|
||||
done
|
||||
cd "${ROOT}"
|
||||
|
||||
# install
|
||||
cp -R vim "${HOME}"/.vim
|
||||
ln -s "${HOME}"/.vim/vimrc "${HOME}"/.vimrc
|
||||
if [ -d "${HOME}/.vimrc" ]; then
|
||||
echo "Vim config already exists, skipping copy"
|
||||
else
|
||||
cp "${HOME}"/.vim/vimrc "${HOME}"/.vimrc
|
||||
fi
|
||||
|
||||
echo Install complete, run the following: source \"${HOME}\"/.bashrc
|
||||
echo Install complete, restart your terminal
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
What is this?
|
||||
===
|
||||
|
||||
My personal vim scripts and settings. Nothing too mind-blowing, but I
|
||||
find it useful having it online and maybe someone will learn something
|
||||
or find out about a vim script they never heard of before.
|
||||
|
||||
This uses [pathogen](http://www.vim.org/scripts/script.php?script_id=2332),
|
||||
which is probably the greatest thing since sliced bread.
|
||||
|
||||
Under bundle, you'll find custom, which is just some custom stuff I added.
|
||||
Nothing too magical, just some indenting rules settings, aliases and other
|
||||
jazz that I didn't want mucking up my vimrc.
|
||||
|
||||
|
||||
Usage
|
||||
===
|
||||
|
||||
Clone the repo to ~/.vim and symlink ~/.vim/vimrc to ~/.vimrc and you'll see what I see.
|
||||
|
||||
|
||||
Included Scripts
|
||||
===
|
||||
|
||||
- [phpfolding.vim](https://github.com/vim-scripts/phpfolding.vim)
|
||||
- [snipmate.vim](https://github.com/msanders/snipmate.vim)
|
||||
- [syntastic](https://github.com/scrooloose/syntastic)
|
||||
- [vim-coffee-script](https://github.com/kchmck/vim-coffee-script)
|
||||
- [vim-colors-solarized](https://github.com/altercation/vim-colors-solarized)
|
||||
- [vim-jade](https://github.com/digitaltoad/vim-jade)
|
||||
- [vim-stylus](https://github.com/wavded/vim-stylus)
|
||||
- [vim-surround](https://github.com/tpope/vim-surround)
|
||||
@@ -1,230 +0,0 @@
|
||||
" pathogen.vim - path option manipulation
|
||||
" Maintainer: Tim Pope <http://tpo.pe/>
|
||||
" Version: 2.0
|
||||
|
||||
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
|
||||
"
|
||||
" For management of individually installed plugins in ~/.vim/bundle (or
|
||||
" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc
|
||||
" prior to `fileype plugin indent on` is the only other setup necessary.
|
||||
"
|
||||
" The API is documented inline below. For maximum ease of reading,
|
||||
" :set foldmethod=marker
|
||||
|
||||
if exists("g:loaded_pathogen") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_pathogen = 1
|
||||
|
||||
" Point of entry for basic default usage. Give a directory name to invoke
|
||||
" pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path
|
||||
" to invoke pathogen#runtime_prepend_subdirectories(). Afterwards,
|
||||
" pathogen#cycle_filetype() is invoked.
|
||||
function! pathogen#infect(...) abort " {{{1
|
||||
let source_path = a:0 ? a:1 : 'bundle'
|
||||
if source_path =~# '[\\/]'
|
||||
call pathogen#runtime_prepend_subdirectories(source_path)
|
||||
else
|
||||
call pathogen#runtime_append_all_bundles(source_path)
|
||||
endif
|
||||
call pathogen#cycle_filetype()
|
||||
endfunction " }}}1
|
||||
|
||||
" Split a path into a list.
|
||||
function! pathogen#split(path) abort " {{{1
|
||||
if type(a:path) == type([]) | return a:path | endif
|
||||
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
|
||||
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
|
||||
endfunction " }}}1
|
||||
|
||||
" Convert a list to a path.
|
||||
function! pathogen#join(...) abort " {{{1
|
||||
if type(a:1) == type(1) && a:1
|
||||
let i = 1
|
||||
let space = ' '
|
||||
else
|
||||
let i = 0
|
||||
let space = ''
|
||||
endif
|
||||
let path = ""
|
||||
while i < a:0
|
||||
if type(a:000[i]) == type([])
|
||||
let list = a:000[i]
|
||||
let j = 0
|
||||
while j < len(list)
|
||||
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
|
||||
let path .= ',' . escaped
|
||||
let j += 1
|
||||
endwhile
|
||||
else
|
||||
let path .= "," . a:000[i]
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
return substitute(path,'^,','','')
|
||||
endfunction " }}}1
|
||||
|
||||
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
|
||||
function! pathogen#legacyjoin(...) abort " {{{1
|
||||
return call('pathogen#join',[1] + a:000)
|
||||
endfunction " }}}1
|
||||
|
||||
" Remove duplicates from a list.
|
||||
function! pathogen#uniq(list) abort " {{{1
|
||||
let i = 0
|
||||
let seen = {}
|
||||
while i < len(a:list)
|
||||
if has_key(seen,a:list[i])
|
||||
call remove(a:list,i)
|
||||
else
|
||||
let seen[a:list[i]] = 1
|
||||
let i += 1
|
||||
endif
|
||||
endwhile
|
||||
return a:list
|
||||
endfunction " }}}1
|
||||
|
||||
" \ on Windows unless shellslash is set, / everywhere else.
|
||||
function! pathogen#separator() abort " {{{1
|
||||
return !exists("+shellslash") || &shellslash ? '/' : '\'
|
||||
endfunction " }}}1
|
||||
|
||||
" Convenience wrapper around glob() which returns a list.
|
||||
function! pathogen#glob(pattern) abort " {{{1
|
||||
let files = split(glob(a:pattern),"\n")
|
||||
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
|
||||
endfunction "}}}1
|
||||
|
||||
" Like pathogen#glob(), only limit the results to directories.
|
||||
function! pathogen#glob_directories(pattern) abort " {{{1
|
||||
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
|
||||
endfunction "}}}1
|
||||
|
||||
" Turn filetype detection off and back on again if it was already enabled.
|
||||
function! pathogen#cycle_filetype() " {{{1
|
||||
if exists('g:did_load_filetypes')
|
||||
filetype off
|
||||
filetype on
|
||||
endif
|
||||
endfunction " }}}1
|
||||
|
||||
" Checks if a bundle is 'disabled'. A bundle is considered 'disabled' if
|
||||
" its 'basename()' is included in g:pathogen_disabled[]' or ends in a tilde.
|
||||
function! pathogen#is_disabled(path) " {{{1
|
||||
if a:path =~# '\~$'
|
||||
return 1
|
||||
elseif !exists("g:pathogen_disabled")
|
||||
return 0
|
||||
endif
|
||||
let sep = pathogen#separator()
|
||||
return index(g:pathogen_disabled, strpart(a:path, strridx(a:path, sep)+1)) != -1
|
||||
endfunction "}}}1
|
||||
|
||||
" Prepend all subdirectories of path to the rtp, and append all 'after'
|
||||
" directories in those subdirectories.
|
||||
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
|
||||
let sep = pathogen#separator()
|
||||
let before = filter(pathogen#glob_directories(a:path.sep."*"), '!pathogen#is_disabled(v:val)')
|
||||
let after = filter(pathogen#glob_directories(a:path.sep."*".sep."after"), '!pathogen#is_disabled(v:val[0:-7])')
|
||||
let rtp = pathogen#split(&rtp)
|
||||
let path = expand(a:path)
|
||||
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
|
||||
let &rtp = pathogen#join(pathogen#uniq(before + rtp + after))
|
||||
return &rtp
|
||||
endfunction " }}}1
|
||||
|
||||
" For each directory in rtp, check for a subdirectory named dir. If it
|
||||
" exists, add all subdirectories of that subdirectory to the rtp, immediately
|
||||
" after the original directory. If no argument is given, 'bundle' is used.
|
||||
" Repeated calls with the same arguments are ignored.
|
||||
function! pathogen#runtime_append_all_bundles(...) " {{{1
|
||||
let sep = pathogen#separator()
|
||||
let name = a:0 ? a:1 : 'bundle'
|
||||
if "\n".s:done_bundles =~# "\\M\n".name."\n"
|
||||
return ""
|
||||
endif
|
||||
let s:done_bundles .= name . "\n"
|
||||
let list = []
|
||||
for dir in pathogen#split(&rtp)
|
||||
if dir =~# '\<after$'
|
||||
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name,'').sep.'*[^~]'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
|
||||
else
|
||||
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name.sep.'*[^~]'), '!pathogen#is_disabled(v:val)')
|
||||
endif
|
||||
endfor
|
||||
let &rtp = pathogen#join(pathogen#uniq(list))
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
let s:done_bundles = ''
|
||||
" }}}1
|
||||
|
||||
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
|
||||
function! pathogen#helptags() " {{{1
|
||||
let sep = pathogen#separator()
|
||||
for dir in pathogen#split(&rtp)
|
||||
if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.'/doc') == 2 && !empty(glob(dir.'/doc/*')) && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
|
||||
helptags `=dir.'/doc'`
|
||||
endif
|
||||
endfor
|
||||
endfunction " }}}1
|
||||
|
||||
command! -bar Helptags :call pathogen#helptags()
|
||||
|
||||
" Like findfile(), but hardcoded to use the runtimepath.
|
||||
function! pathogen#rtpfindfile(file,count) "{{{1
|
||||
let rtp = pathogen#join(1,pathogen#split(&rtp))
|
||||
return fnamemodify(findfile(a:file,rtp,a:count),':p')
|
||||
endfunction " }}}1
|
||||
|
||||
function! s:find(count,cmd,file,...) " {{{1
|
||||
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
|
||||
let file = pathogen#rtpfindfile(a:file,a:count)
|
||||
if file ==# ''
|
||||
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
|
||||
elseif a:0
|
||||
let path = file[0:-strlen(a:file)-2]
|
||||
execute a:1.' `=path`'
|
||||
return a:cmd.' '.fnameescape(a:file)
|
||||
else
|
||||
return a:cmd.' '.fnameescape(file)
|
||||
endif
|
||||
endfunction " }}}1
|
||||
|
||||
function! s:Findcomplete(A,L,P) " {{{1
|
||||
let sep = pathogen#separator()
|
||||
let cheats = {
|
||||
\'a': 'autoload',
|
||||
\'d': 'doc',
|
||||
\'f': 'ftplugin',
|
||||
\'i': 'indent',
|
||||
\'p': 'plugin',
|
||||
\'s': 'syntax'}
|
||||
if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
|
||||
let request = cheats[a:A[0]].a:A[1:-1]
|
||||
else
|
||||
let request = a:A
|
||||
endif
|
||||
let pattern = substitute(request,'\'.sep,'*'.sep,'g').'*'
|
||||
let found = {}
|
||||
for path in pathogen#split(&runtimepath)
|
||||
let matches = split(glob(path.sep.pattern),"\n")
|
||||
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
|
||||
call map(matches,'v:val[strlen(path)+1:-1]')
|
||||
for match in matches
|
||||
let found[match] = 1
|
||||
endfor
|
||||
endfor
|
||||
return sort(keys(found))
|
||||
endfunction " }}}1
|
||||
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read<bang>',<q-args>)
|
||||
command! -bar -bang -count=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,'lcd')
|
||||
|
||||
" vim:set ft=vim ts=8 sw=2 sts=2:
|
||||
123
vim/vimrc
123
vim/vimrc
@@ -1,123 +0,0 @@
|
||||
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
|
||||
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
|
||||
" you can find below. If you wish to change any of those settings, you should
|
||||
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
|
||||
" everytime an upgrade of the vim packages is performed. It is recommended to
|
||||
" make changes after sourcing debian.vim since it alters the value of the
|
||||
" 'compatible' option.
|
||||
|
||||
" This line should not be removed as it ensures that various options are
|
||||
" properly set to work with the Vim-related packages available in Debian.
|
||||
" runtime! debian.vim
|
||||
|
||||
" Uncomment the next line to make Vim more Vi-compatible
|
||||
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
|
||||
" options, so any other options should be set AFTER setting 'compatible'.
|
||||
"set nocompatible
|
||||
|
||||
" Vim5 and later versions support syntax highlighting. Uncommenting the next
|
||||
" line enables syntax highlighting by default.
|
||||
syntax enable
|
||||
|
||||
" Start Pathogen
|
||||
call pathogen#infect()
|
||||
" Enable filetype plugins
|
||||
filetype plugin on
|
||||
|
||||
" Some custom highlighting rules
|
||||
" au BufNewFile,BufRead *.ctp setfiletype php
|
||||
|
||||
" If using a dark background within the editing area and syntax highlighting
|
||||
" turn on this option as well
|
||||
set background=dark
|
||||
|
||||
" The following are commands that change the default colors of the syntax
|
||||
" highlighting. Comment of change them to meet your needs
|
||||
hi Comment ctermfg=DarkGreen
|
||||
hi Search ctermbg=red
|
||||
hi String ctermfg=grey
|
||||
|
||||
" Load the solarized color theme
|
||||
"colorscheme solarized
|
||||
|
||||
" Uncomment the following to have Vim jump to the last position when
|
||||
" reopening a file
|
||||
"if has("autocmd")
|
||||
" au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
||||
" \| exe "normal g'\"" | endif
|
||||
"endif
|
||||
|
||||
" Uncomment the following to have Vim load indentation rules according to the
|
||||
" detected filetype. Per default Debian Vim only load filetype specific
|
||||
" plugins.
|
||||
if has("autocmd")
|
||||
filetype indent on
|
||||
endif
|
||||
|
||||
" Allow indenting to be toggled by pressing F8
|
||||
nnoremap <F8> :setl noai! nocin! nosi!
|
||||
|
||||
" Allow quick paste toggle
|
||||
nnoremap <F2> :set invpaste paste?<CR>
|
||||
set pastetoggle=<F2>
|
||||
set showmode
|
||||
|
||||
" The following are commented out as they cause vim to behave a lot
|
||||
" differently from regular Vi. They are highly recommended though.
|
||||
set showcmd " Show (partial) command in status line.
|
||||
set showmatch " Show matching brackets.
|
||||
set ignorecase " Do case insensitive matching
|
||||
set smartcase " Do smart case matching
|
||||
set incsearch " Incremental search as you type it
|
||||
set hlsearch " Highlight search phrases
|
||||
"set autowrite " Automatically save before commands like :next and :make
|
||||
"set hidden " Hide buffers when they are abandoned
|
||||
"set mouse=a " Enable mouse usage (all modes) in terminals
|
||||
set visualbell " Enable visual bell
|
||||
set ruler " Always show a ruler
|
||||
set laststatus=2 " Always shows the last status menu
|
||||
set statusline=%F%m%r%h%w\ (%{&ff})\ %=\ [%l,%v\ %L\ (%p%%)]
|
||||
set noerrorbells " Don't ring the bell for errors
|
||||
set nostartofline " Don't move cursor to the start of the line
|
||||
set shortmess=at " Avoid the 'press enter' with error messages
|
||||
|
||||
"set expandtab " insert spaces instead of tabs
|
||||
set tabstop=4 " use X spaces when tab is pressed
|
||||
set shiftwidth=4 " shifttabs are also X spaces
|
||||
set smarttab " make delete remove X spaces
|
||||
set smartindent " allow vim to do intelligent indenting
|
||||
|
||||
" Syntastic settings
|
||||
let g:syntastic_check_on_open=1
|
||||
" Status line settings
|
||||
set statusline+=%#warningmsg#
|
||||
set statusline+=%{SyntasticStatuslineFlag()}
|
||||
set statusline+=%*
|
||||
|
||||
|
||||
" On some systems, it may be nesseccary to re-map the arrow keys. Uncomment
|
||||
" these next lines if that is the case.
|
||||
"map <up> gk
|
||||
"map <down> gj
|
||||
"map <left> gh
|
||||
"map <right> gl
|
||||
|
||||
" Disable the 'auto commenting' crap
|
||||
au FileType * setlocal comments=
|
||||
|
||||
" Source a global configuration file if available
|
||||
" XXX Deprecated, please move your changes here in /etc/vim/vimrc
|
||||
"if filereadable("/etc/vim/vimrc.local")
|
||||
" source /etc/vim/vimrc.local
|
||||
"endif
|
||||
|
||||
" Omnifunc stuff
|
||||
"autocmd FileType python set omnifunc=pythoncomplete#Complete
|
||||
"autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
|
||||
"autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
|
||||
"autocmd FileType css set omnifunc=csscomplete#CompleteCSS
|
||||
"autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
|
||||
"autocmd FileType php set omnifunc=phpcomplete#CompletePHP
|
||||
"autocmd FileType c set omnifunc=ccomplete#Complete
|
||||
"autocmd FileType coffee set omnifunc=coffeecomplete#Complete
|
||||
|
||||
|
||||
Reference in New Issue
Block a user