Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

replace Command-T with CtrlP

  • Loading branch information...
commit caf60d612fe923b53c9c1b75c798b1d5345a0ea4 1 parent f571d4b
@mislav authored
View
6 .gitmodules
@@ -22,9 +22,6 @@
[submodule "bundle/endwise"]
path = bundle/endwise
url = https://github.com/tpope/vim-endwise
-[submodule "bundle/command-t"]
- path = bundle/command-t
- url = https://github.com/wincent/Command-T
[submodule "bundle/coffee-script"]
path = bundle/coffee-script
url = https://github.com/kchmck/vim-coffee-script
@@ -64,3 +61,6 @@
[submodule "bundle/turbux"]
path = bundle/turbux
url = https://github.com/jgdavey/vim-turbux
+[submodule "bundle/ctrlp"]
+ path = bundle/ctrlp
+ url = https://github.com/kien/ctrlp.vim
View
27 README.md
@@ -37,16 +37,29 @@ files inside the ".vim" directory.
* `<C-j/k/h/l>` - switch between splits (no need to prepend `<C-w>`)
* cursor keys for movement are disabled!
* `Q` - format lines
-* `,,` alternates between two most recent buffers
-* `,f` - jump to file:
- * `,F` - search in directory of current buffer
- * `,gl` - in `lib/`
- * `,gm` - in `app/models`
- * `,gv` - in `app/views`
- * `,gc` - in `app/controllers`
* `,cf` - search for merge conflicts in buffer
* `:KillWhitespace` - strip trailing whitespace
+### File switching (CtrlP)
+
+* `,,` - toggle between two recently open buffers
+* `<C-p>` - fuzzy file search
+* `<C-P>` - search in directory of current buffer
+* `:CtrlP [dir]` - search files
+* `:CtrlBuffer` - search buffers
+* `:CtrlPTag` - search tags
+* `:CtrlPBufTag` - search tags in current buffer
+* `:CtrlPMixed` - search in files, buffers and MRU
+
+Inside the CtrlP prompt:
+
+* `<C-j/k>` - move down/up between file matches
+* `<C-n/p>` - next/previous string in prompt's history
+* `<C-s/v>` - open file in new horizontal/vertical split
+* `<C-y>` - create a new file and its parent directories
+* `<C-z>` - mark a file to be opened with `<C-o>`
+* `<C-o>` - open marked files
+
### Ack
* `:Ack -w foo_bar --no-js --no-css`
View
26 Rakefile
@@ -1,4 +1,4 @@
-task :default => [:tmp_dirs, :update, :command_t, :link]
+task :default => [:tmp_dirs, :update, :link, :macvim_check]
desc %(Bring bundles up to date)
task :update do
@@ -35,23 +35,6 @@ task :tmp_dirs do
mkdir_p "_temp"
end
-desc %(Compile Command-T plugin)
-task :command_t => :macvim_check do
- vim = which('mvim') || which('vim') or abort "vim not found on your system"
- ruby = read_ruby_version(vim)
-
- Dir.chdir "bundle/command-t/ruby/command-t" do
- if ruby
- puts "Compiling Command-T plugin..."
- sh(*Array(ruby).concat(%w[extconf.rb]))
- sh "make clean && make"
- else
- warn color('Warning:', 31) + " Can't compile Command-T, no ruby support in #{vim}"
- sh "make clean"
- end
- end
-end
-
task :macvim_check do
if mvim = which('mvim') and '/usr/bin/vim' == which('vim')
warn color('Warning:', 31) + " You have MacVim installed, but `vim` still opens system Vim."
@@ -65,13 +48,6 @@ def color msg, code
end
end
-# Read which ruby version is vim compiled against
-def read_ruby_version vim
- script = %{require "rbconfig"; print File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["ruby_install_name"])}
- version = `#{vim} --nofork --cmd 'ruby #{script}' --cmd 'q' 2>&1 >/dev/null | grep -v 'Vim: Warning'`.strip
- version unless version.empty? or version.include?("command is not available")
-end
-
# Cross-platform way of finding an executable in the $PATH.
#
# which('ruby') #=> /usr/bin/ruby
1  bundle/command-t
@@ -1 +0,0 @@
-Subproject commit 07087e16ba8fe0a87b1d1ccd03e158a0157dc1f8
1  bundle/ctrlp
@@ -0,0 +1 @@
+Subproject commit 78303a2b5fe4fcfecda0de1c7832fad60859fb63
View
15 vimrc
@@ -102,20 +102,13 @@ let mapleader=","
nmap <leader>p pV`]=
nmap <leader>P PV`]=
-map <leader>gv :CommandTFlush<cr>\|:CommandT app/views<cr>
-map <leader>gc :CommandTFlush<cr>\|:CommandT app/controllers<cr>
-map <leader>gm :CommandTFlush<cr>\|:CommandT app/models<cr>
-map <leader>gh :CommandTFlush<cr>\|:CommandT app/helpers<cr>
-map <leader>gl :CommandTFlush<cr>\|:CommandT lib<cr>
-map <leader>gf :CommandTFlush<cr>\|:CommandT features<cr>
-map <leader>gg :topleft 100 :split Gemfile<cr>
-map <leader>f :CommandTFlush<cr>\|:CommandT<cr>
" http://vimcasts.org/e/14
cnoremap %% <C-R>=expand('%:h').'/'<cr>
-map <leader>F :CommandTFlush<cr>\|:CommandT %%<cr>
-let g:CommandTMaxHeight=10
-let g:CommandTMinHeight=4
+map <C-P> :CtrlP %%<cr>
+map <leader>b :CtrlPBuffer<cr>
+let g:ctrlp_root_markers = ['.git', 'tags']
+" let g:ctrlp_extensions = ['tag', 'buffertag']
let g:turbux_command_test_unit = 'ruby -Ilib:test'
" let g:turbux_command_cucumber = 'cucumber -f progress'
Please sign in to comment.
Something went wrong with that request. Please try again.