Permalink
Browse files

merge original

  • Loading branch information...
1 parent fa51927 commit 5fa5924bd686dbf8b2dcda787d036152189fcaee @jfrolich committed Nov 7, 2011
Showing with 73 additions and 38 deletions.
  1. +1 −2 .gitignore
  2. +17 −27 README.markdown
  3. +29 −1 Rakefile
  4. +0 −1 backup/.gitignore
  5. +26 −1 gvimrc
  6. +0 −6 vimrc
View
@@ -1,7 +1,6 @@
.netrwhist
tmp
nerdtree_plugin
-
after
autoload
doc
@@ -14,5 +13,5 @@ ftdetect
ftplugin
indent
.VimballRecord
-
.DS_Store
+backup
View
@@ -129,12 +129,11 @@ Janus ships with a number of basic customizations for vim:
characters) in insert mode
* `<Leader>e` expands to `:e {directory of current file}/` (open in the
current buffer)
-* `<Leader>tr` expands to `:te {directory of current file}/` (open in a
+* `<Leader>te` expands to `:te {directory of current file}/` (open in a
new MacVIM tab)
* `<C-P>` inserts the directory of the current file into a command
-* Automatic insertion of closing quotes, parenthesis, and braces
-## "Project Drawer" aka NERDTree
+## "Project Drawer" aka [NERDTree](http://github.com/wycats/nerdtree)
NERDTree is a file explorer plugin that provides "project drawer"
functionality to your vim projects. You can learn more about it with
@@ -155,22 +154,23 @@ NERDTree:
* In general, assume that there is a single NERDTree buffer on the left
and one or more editing buffers on the right
-## Ack.vim
+## [Ack.vim](http://github.com/mileszs/ack.vim)
+
Ack.vim uses ack to search inside the current directory for a pattern.
You can learn more about it with :help Ack
**Customizations**: Janus rebinds command-shift-f (`<D-F>`) to bring up
`:Ack `.
-## Align
+## [Align](http://github.com/tsaleh/vim-align)
Align lets you align statements on their equal signs, make comment
boxes, align comments, align declarations, etc.
* `:5,10Align =>` to align lines 5-10 on `=>`'s
-## Command-T
+## [Command-T](https://wincent.com/products/command-t)
Command-T provides a mechanism for searching for a file inside the
current working directory. It behaves similarly to command-t in
@@ -179,7 +179,7 @@ Textmate.
**Customizations**: Janus rebinds command-t (`<D-t>`) to bring up this
plugin. It defaults to `<Leader>t`.
-## ConqueTerm
+## [ConqueTerm](http://code.google.com/p/conque/)
ConqueTerm embeds a basic terminal inside a vim buffer. The terminal has
an insert mode in which you can type commands, tab complete and use the
@@ -192,7 +192,7 @@ other vim commands on the buffer, like yank and paste.
**Note**: To get colors working, you might have to `export TERM=xterm`
and use `ls -G` or `gls --color`
-## indent\_object
+## [indent\_object](http://github.com/michaeljsmith/vim-indent-object)
Indent object creates a "text object" that is relative to the current
ident. Text objects work inside of visual mode, and with `c` (change),
@@ -202,30 +202,31 @@ normal mode, and type `v ii`. Then repeat `ii`.
**Note**: indent\_object seems a bit busted. It would also be nice if
there was a text object for Ruby `class` and `def` blocks.
-## surround
+## [surround](http://github.com/tpope/vim-surround)
Surround allows you to modify "surroundings" around the current text.
For instance, if the cursor was inside `"foo bar"`, you could type
`cs"'` to convert the text to `'foo bar'`.
There's a lot more; check it out at `:help surround`
-## NERDCommenter
+## [NERDCommenter](http://github.com/ddollar/nerdcommenter)
NERDCommenter allows you to wrangle your code comments, regardless of
filetype. View `:help NERDCommenter` for all the details.
**Customizations**: Janus binds command-/ (`<D-/>`) to toggle comments.
-## SuperTab
+## [SuperTab](http://github.com/ervandew/supertab)
In insert mode, start typing something and hit `<TAB>` to tab-complete
based on the current context.
## ctags
-Janus includes the TagList plugin, which binds `:Tlist` to an overview
-panel that lists all ctags for easy navigation.
+Janus includes the [TagList](http://github.com/vim-scripts/taglist.vim)
+plugin, which binds `:Tlist` to an overview panel that lists all ctags
+for easy navigation.
**Customizations**: Janus binds `<Leader>rt` to the ctags command to
update tags.
@@ -238,7 +239,7 @@ ctag support. Tag navigation creates a stack which can traversed via
`Ctrl-]` (to find the source of a token) and `Ctrl-T` (to jump back up
one level).
-## Git Support (Fugitive)
+## Git Support ([Fugitive](http://github.com/tpope/vim-fugitive))
Fugitive adds pervasive git support to git directories in vim. For more
information, use `:help fugitive`
@@ -250,32 +251,21 @@ hunks in the file.
Use `:Gdiff` on an open file to see what changes have been made to that
file
-## Gist-vim
+## [Gist-vim](http://github.com/mattn/gist-vim)
Nice [gist integration](https://github.com/mattn/gist-vim) by mattn.
Requires exporting your `GITHUB_TOKEN` and `GITHUB_USER` as environment
variables or setup your [GitHub token config](http://help.github.com/git-email-settings/).
Try `:Gist`, `:Gist -p` and visual blocks.
-## ZoomWin
+## [ZoomWin](http://github.com/vim-scripts/ZoomWin)
When working with split windows, ZoomWin lets you zoom into a window and
out again using `Ctrl-W o`
**Customizations**: Janus binds `<Leader><Leader>` to `:ZoomWin`
-## Hammer
-
-Hammer takes the current buffer, tries to convert it to HTML, and opens
-it in your default browser. Hammer is enabled for Markdown files, but
-has support for much more.
-
-**Customizations**: Janus binds `<Leader>p` to this plugin.
-
-**Tip**: Check out [Hammer's README](https://github.com/robgleeson/hammer.vim#readme)
-to see the requirements for previewing other file formats.
-
## Additional Syntaxes
Janus ships with a few additional syntaxes:
View
@@ -1,5 +1,5 @@
module VIM
- Dirs = %w[ after autoload doc plugin ruby snippets syntax ftdetect ftplugin colors indent ]
+ Dirs = %w[ after autoload doc plugin ruby snippets syntax ftdetect ftplugin colors indent backup ]
end
directory "tmp"
@@ -176,6 +176,27 @@ vim_plugin_task "peepopen", "git://github.com/mrchrisadams/vim-peepopen.
# end
# end
+vim_plugin_task "pep8" do
+ File.open(File.expand_path("../ftplugin/python_pep8.vim", __FILE__), "w") do |file|
+ file.puts <<-VIM.gsub(/^ +/, "")
+ " make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
+ setlocal softtabstop=4
+ setlocal tabstop=4
+ setlocal shiftwidth=4
+ setlocal textwidth=79
+ VIM
+ end
+end
+
+vim_plugin_task "make_tabs" do
+ File.open(File.expand_path("../ftplugin/make_tabs.vim", __FILE__), "w") do |file|
+ file.puts <<-VIM.gsub(/^ +/, "")
+ " make uses real tabs
+ setlocal noexpandtab
+ VIM
+ end
+end
+
vim_plugin_task "janus_themes" do
# custom version of railscasts theme
File.open(File.expand_path("../colors/railscasts+.vim", __FILE__), "w") do |file|
@@ -221,6 +242,13 @@ end
vim_plugin_task "vwilight" do
sh "curl https://raw.github.com/gist/796172/724c7ca237a7f6b8d857c4ac2991cfe5ffb18087 > colors/vwilight.vim"
end
+vim_plugin_task "blackboard" do
+ sh "curl https://raw.github.com/nelstrom/vim-blackboard/master/colors/blackboard.vim > colors/blackboard.vim"
+end
+vim_plugin_task "github" do
+ sh "curl https://raw.github.com/joshuaclayton/dotfiles/master/vim/colors/github.vim > colors/github.vim"
+end
+
if File.exists?(janus = File.expand_path("~/.janus.rake"))
puts "Loading your custom rake file"
View
@@ -1 +0,0 @@
-*
View
27 gvimrc
@@ -78,7 +78,23 @@ function StartTerm()
endfunction
" Project Tree
-autocmd VimEnter * call s:CdIfDirectory(expand("<amatch>"))
+if exists("loaded_nerd_tree")
+ autocmd VimEnter * call s:CdIfDirectory(expand("<amatch>"))
+ autocmd FocusGained * call s:UpdateNERDTree()
+ autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft()
+endif
+
+" Close all open buffers on entering a window if the only
+" buffer that's left is the NERDTree buffer
+function s:CloseIfOnlyNerdTreeLeft()
+ if exists("t:NERDTreeBufName")
+ if bufwinnr(t:NERDTreeBufName) != -1
+ if winnr("$") == 1
+ q
+ endif
+ endif
+ endif
+endfunction
" If the parameter is a directory, cd into it
function s:CdIfDirectory(directory)
@@ -134,6 +150,15 @@ ruby << RUBY
RUBY
endfunction
+" Define the NERDTree-aware aliases
+if exists("loaded_nerd_tree")
+ call s:DefineCommand("cd", "ChangeDirectory")
+ call s:DefineCommand("touch", "Touch")
+ call s:DefineCommand("rm", "Remove")
+ call s:DefineCommand("e", "Edit")
+ call s:DefineCommand("mkdir", "Mkdir")
+ cabbrev Edit! e!
+endif
" Include user's local vim config
if filereadable(expand("~/.gvimrc.local"))
View
6 vimrc
@@ -60,9 +60,6 @@ function s:setupMarkup()
map <buffer> <Leader>p :Hammer<CR>
endfunction
-" make uses real tabs
-au FileType make set noexpandtab
-
" Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby
au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,config.ru} set ft=ruby
@@ -74,9 +71,6 @@ au BufNewFile,BufRead *.json set ft=javascript
au BufRead,BufNewFile *.txt call s:setupWrapping()
-" make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
-au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
-
" allow backspacing over everything in insert mode
set backspace=indent,eol,start

0 comments on commit 5fa5924

Please sign in to comment.