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
@@ -1,7 +1,6 @@
@@ -14,5 +13,5 @@ ftdetect
@@ -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](
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](
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](
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](
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](
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](
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](
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](
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](
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](
+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](
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
-## Gist-vim
+## [Gist-vim](
Nice [gist integration]( by mattn.
Requires exporting your `GITHUB_TOKEN` and `GITHUB_USER` as environment
variables or setup your [GitHub token config](
Try `:Gist`, `:Gist -p` and visual blocks.
-## ZoomWin
+## [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](
-to see the requirements for previewing other file formats.
## Additional Syntaxes
Janus ships with a few additional syntaxes:
@@ -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 ]
directory "tmp"
@@ -176,6 +176,27 @@ vim_plugin_task "peepopen", "git://
# end
# end
+vim_plugin_task "pep8" do
+"../ftplugin/python_pep8.vim", __FILE__), "w") do |file|
+ file.puts <<-VIM.gsub(/^ +/, "")
+ " make Python follow PEP8 ( )
+ setlocal softtabstop=4
+ setlocal tabstop=4
+ setlocal shiftwidth=4
+ setlocal textwidth=79
+ end
+vim_plugin_task "make_tabs" do
+"../ftplugin/make_tabs.vim", __FILE__), "w") do |file|
+ file.puts <<-VIM.gsub(/^ +/, "")
+ " make uses real tabs
+ setlocal noexpandtab
+ end
vim_plugin_task "janus_themes" do
# custom version of railscasts theme"../colors/railscasts+.vim", __FILE__), "w") do |file|
@@ -221,6 +242,13 @@ end
vim_plugin_task "vwilight" do
sh "curl > colors/vwilight.vim"
+vim_plugin_task "blackboard" do
+ sh "curl > colors/blackboard.vim"
+vim_plugin_task "github" do
+ sh "curl > colors/github.vim"
if File.exists?(janus = File.expand_path("~/.janus.rake"))
puts "Loading your custom rake file"
@@ -1 +0,0 @@
27 gvimrc
@@ -78,7 +78,23 @@ function StartTerm()
" 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()
+" 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
" If the parameter is a directory, cd into it
function s:CdIfDirectory(directory)
@@ -134,6 +150,15 @@ ruby << RUBY
+" 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!
" Include user's local vim config
if filereadable(expand("~/.gvimrc.local"))
6 vimrc
@@ -60,9 +60,6 @@ function s:setupMarkup()
map <buffer> <Leader>p :Hammer<CR>
-" make uses real tabs
-au FileType make set noexpandtab
" Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby
au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,} 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 ( )
-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.