Skip to content

Instantly share code, notes, and snippets.

@adimircolen
Created May 19, 2011 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adimircolen/980381 to your computer and use it in GitHub Desktop.
Save adimircolen/980381 to your computer and use it in GitHub Desktop.
pathogen with syntastic (https://github.com/adimircolen/vim_files)
#!/usr/bin/env ruby
git_bundles = [
"git://github.com/astashov/vim-ruby-debugger.git",
"git://github.com/msanders/snipmate.vim.git",
"git://github.com/scrooloose/nerdtree.git",
"git://github.com/scrooloose/syntastic.git",
"git://github.com/timcharper/textile.vim.git",
"git://github.com/tpope/vim-cucumber.git",
"git://github.com/tpope/vim-fugitive.git",
"git://github.com/tpope/vim-git.git",
"git://github.com/tpope/vim-haml.git",
"git://github.com/tpope/vim-markdown.git",
"git://github.com/tpope/vim-rails.git",
"git://github.com/tpope/vim-repeat.git",
"git://github.com/tpope/vim-surround.git",
"git://github.com/tpope/vim-vividchalk.git",
"git://github.com/tsaleh/vim-align.git",
"git://github.com/tsaleh/vim-shoulda.git",
"git://github.com/tsaleh/vim-supertab.git",
"git://github.com/tsaleh/vim-tcomment.git",
"git://github.com/vim-ruby/vim-ruby.git",
"git://github.com/vim-scripts/Vim-Rspec.git",
"git://github.com/vim-scripts/TinyBufferExplorer.git",
"git://github.com/mattsoutherden/vim-fuzzyfinder_textmate.git",
"git://github.com/tomtom/checksyntax_vim.git",
"git://github.com/kchmck/vim-coffee-script.git"
]
vim_org_scripts = [
["IndexedSearch", "7062", "plugin"],
#["gist", "12732", "plugin"],
["jquery", "12107", "syntax"],
["vim-vibrantink", "1794", "colors"]
]
require 'fileutils'
require 'open-uri'
bundles_dir = File.join(File.dirname(__FILE__), "bundle")
FileUtils.cd(bundles_dir)
puts "Trashing everything (lookout!)"
Dir["*"].each {|d| FileUtils.rm_rf d }
git_bundles.each do |url|
dir = url.split('/').last.sub(/\.git$/, '')
puts " Unpacking #{url} into #{dir}"
`git clone #{url} #{dir}`
FileUtils.rm_rf(File.join(dir, ".git"))
end
vim_org_scripts.each do |name, script_id, script_type|
puts " Downloading #{name}"
local_file = File.join(name, script_type, "#{name}.vim")
FileUtils.mkdir_p(File.dirname(local_file))
File.open(local_file, "w") do |file|
file << open("http://www.vim.org/scripts/download_script.php?src_id=#{script_id}").read
end
end
"Use Vim settings, rather then Vi settings (much better!).
"This must be first, because it changes other options as a side effect.
set nocompatible
"runtime! autoload/pathogen.vim
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
.
.
.
.
"statusline setup
set statusline=%f "tail of the filename
"display a warning if fileformat isnt unix
set statusline+=%#warningmsg#
set statusline+=%{&ff!='unix'?'['.&ff.']':''}
set statusline+=%*
"display a warning if file encoding isnt utf-8
set statusline+=%#warningmsg#
set statusline+=%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''}
set statusline+=%*
set statusline+=%h "help file flag
set statusline+=%y "filetype
set statusline+=%r "read only flag
set statusline+=%m "modified flag
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment