{"id":13898860,"url":"https://github.com/krisleech/vimfiles","last_synced_at":"2025-04-14T13:32:54.721Z","repository":{"id":1702292,"uuid":"2431023","full_name":"krisleech/vimfiles","owner":"krisleech","description":"Ruby/Rails centric vimfiles with support for Git, RVM and more.","archived":false,"fork":false,"pushed_at":"2013-11-29T20:42:43.000Z","size":849,"stargazers_count":182,"open_issues_count":1,"forks_count":32,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-13T03:06:53.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"VimL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krisleech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-21T16:31:49.000Z","updated_at":"2023-06-22T20:18:45.000Z","dependencies_parsed_at":"2022-09-07T19:00:34.184Z","dependency_job_id":null,"html_url":"https://github.com/krisleech/vimfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2Fvimfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2Fvimfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2Fvimfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2Fvimfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krisleech","download_url":"https://codeload.github.com/krisleech/vimfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248888707,"owners_count":21178095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T18:04:29.755Z","updated_at":"2025-04-14T13:32:54.684Z","avatar_url":"https://github.com/krisleech.png","language":"VimL","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# Ruby/Rails centric vimfiles and installer\n\nWith a great colour scheme and support for auto-complete, git, rvm and sparkup.\n\n## Requirements\n\nVim 7.3 or better\nTested on MacOS and Linux\n\nIntroduction to Vim: http://blog.interlinked.org/tutorials/vim_tutorial.html\n\n## Quick Install\n\n    curl https://raw.github.com/krisleech/vimfiles/master/bootstrap.sh -o - | sh\n\n## Basic Mappings\n\nThe leader is mapped to `,`\n\n### In Normal mode (`Esc` or `jj`)\n\n`,p`     - File browser (NerdTree)\n\n`,f`     - Find in Files (Command-t)\n\n`Space`  - Search in buffer\n\n`,a`     - Search in files (Ack)\n\n`,b`     - Search open buffers (Fuzzy Finder)\n\n`,d`     - close buffer\n\n`,D`     - close all buffers\n\n`,Space` - Remove search highlighting\n\n`,t`     - Show tags\n\n`//`     - Toggle comments (T-Comment)\n\n`F5`     - Undo history (GUndo)\n\n`F6`     - Auto format\n\n`Tab`    - Next buffer\n\n`Shift + Tab` - Previous buffer\n\n`,,`     - Toggle between last two buffers\n\n`,m`     - Jump to model\n\n`,v`     - Jump to view\n\n`,gm`    - Find in app/models\n\n`,gc`    - Find in app/controller\n\n`,gv`    - Find in app/views\n\n`,gr`    - Open routes in split\n\n`,gg`    - Open Gemfile in split\n\n`,vir`   - Visual select inner Ruby block\n\n`,var`   - Visual select around Ruby block\n\n### In Insert mode (`i`)\n\n`jj` - Back to normal mode\n\n`\u003ctab\u003e` - auto complete or expand snippet\n\nSee `.vimrc` for more.\n\n## Plugins\n\n### rails            \n\n*Lots* of stuff - get to know this plugin!\n\n`:Rmodel` - jump to model\n\n`:Rview` - jump to view\n\n`:help rails`\n\n### coffee-script\n\nCoffeeScript support\n\n`:CoffeeCompile watch` show compiled js in split\n\nhttps://github.com/kchmck/vim-coffee-script\n\n### ruby-block\n\nProvides text-objects for Ruby blocks\n\n`var` (visual around Ruby)\n\n`vir` (visual inner Ruby)\n\n`ar` / `ir` (expand/contract selection)\n\n`cir` (change inner Ruby)\n\n`dar` (delete around Ruby)\n\nhttp://vimcasts.org/blog/2010/12/a-text-object-for-ruby-blocks/\n\n### sparkup (`ctrl+e`)\n\nExpand CSS selectors `div.event` in to markup `\u003cdiv class='event'\u003e\u003c/div\u003e`\n\nhttp://net.tutsplus.com/articles/general/quick-tip-even-quicker-markup-with-sparkup/\n\n### fugitive         \n\nGit integration\n\n*Lots* of stuff\n\n`:Gstatus` and press `-` to stage file\n\nhttp://vimcasts.org/episodes/fugitive-vim---a-complement-to-command-line-git/\n\n`:help fugitive`\n\n### rvm              \n\nAdd RVM integration\n\n### command-t (`,f`)            \n\nFind files in your project with minimal keypresses\n\nFor example `conadus` would find `controllers/admin/users`\n\n`,f path_or_filename`\n\n`,gf path_or_filename` - restrict to files in current directory\n\n`Ctrl + n` - next result\n\n`Ctrl + p` - previous result\n\n`Ctrl + c` - cancel\n\n### snipmate (`TAB`)         \n\nSnippets, press `TAB` to expand\n\nExamples (in a Ruby file):\n\n`def\u003ctab\u003e`\n\n`.each\u003ctab\u003e`\n\n`.eado\u003ctab\u003e`\n\n`ife\u003ctab\u003e`\n\n### gist (`:Gist`)\n\nGist current file/selection\n\nRequires setting GITHUB_TOKEN and GITHUB_USER Env's\n\n### gundo (`F5`)\n\nNavigate changes history tree \n\nhttp://vimcasts.org/episodes/undo-branching-and-gundo-vim/\n\n### tabular\n\nAlign stuff\n\nhttp://vimcasts.org/episodes/aligning-text-with-tabular-vim/\n\n### conque\n\nTerminal/Interactive programs\n\n`:Conque zsh`\n\n`:Conque ls`\n\nNote you can also drop back to the terminal using Ctrl+Z, to get\nback to Vim with `%1`. This is not a feature of Conque.\n\n### tcomment (`//`)\n\nComment/Uncomment stuff out\n\n### yankring\n\nShows history of yanked (copied) text\n\nPressing `ctrl + p` will also cycle through paste history\n\n### ack (`,a`)\n\nSearch project for text (aka find in files)\n\n`,a word`\n\n`,a \"some words\"`\n\n### nerdtree (`,p`)             \n\nProject file browser\n\n`,p` opens file browser\n\n`o` / `x` open and close files/folders\n\n`m` menu to move/delete/copy files/folders\n\n`?` Help\n\nI use nerdtree for creating or moving files, but find command-t quicker for\nopening files.\n\n### surround (`ys`/`cs`/`ds`)\n\nAllows adding/removing/changing of surroundings\n\nI would highly recommend getting to know this plugin, it is very useful.\nEspecially when you grok text objects.\n\n*Characters*\n\n`ysiw)`    - surround inner word with `()`\n\n`ysiw(`    - surround inner word with `(  )`\n\nIn the above example `iw` can be replaced with any text object or motion.\n\nIf you find yourself manually adding surroundings, stop and work out the\ncorrect text object or motion.\n\n`cs\"'`     - change surrounding from `\"` to `'`\n\n`ds`       - delete surrounding\n\n*Tags*\n\n`yss\u003cp\u003e`  - surround line in `\u003cp\u003e` tags\n\n`cst\u003cdiv\u003e` - change surround tag to `\u003cdiv\u003e`\n\n### solarized \n\nA colour scheme, both light and dark version\n\n`:set background=dark`\n\n`:set background=light`\n\n### fuzzyfinder (`,b`)\n\nFind open buffer by path/filename\n\n### taglist (`,l`)\n\nLists method names, provide auto complete\n\n`,rt` Generates Ruby tags, this will include tags for your code and gems if\nusing RVM.\n\nIf you are not using RVM you can run `ctags -R` in project root to generate tags.\n\nOr to run directly from within vim `:!ctags -R`.\n\n`Ctrl+]` - skips to the tag under the cursor\n\n### preview (`,P`)\n\nPreview markup files such as Markdown and RDoc\n\nEach format requires the relevant gem to be installed such as `bluecloth`\nfor Markdown and `github-markup` for RDoc.\n\n### syntastic\n\nSyntax checking\n\nWhen a file is saved the syntax is automatically checked and any errors\nreported.\n\n### vundle\n\nPlugin manager and part of the reason why my vimfiles as so compact\n\n## INSTALLATION\n\nNote: If you are using RVM make sure you use system ruby before installation.\n    \n    rvm use system\n\nNote: If you already have Vim installed ensure it has support for Ruby:\n\n    vim --version | grep ruby\n\nYou should see `+ruby,` if you see `-ruby` you need to reinstall Vim with Ruby support\n\n### Install Vim (if not already installed)\n\n#### MacOS: MacVim / Vim \n\n    brew install macvim --override-system-vim --enable-clipboard\n\nAdd `/usr/local/bin` before `/usr/bin` in your `$PATH` so you use the version of\nvim installed by Homebrew, not the one that comes with MacOS.\n\nBy installing Vim in this way MacVim and regular Vim are exactly the same.\n\n#### Ubuntu: gVim / Vim\n\n*Server*\n\n    apt-get install vim-nox\n\n*Desktop*\n\n    apt-get install vim-gnome\n\n#### GNU/Linux from source\n\nIf you have an old GNU/Linux distro which does not have Vim 7.3 or better in its repos then install from source.\n\nThe configure options below leave out any GUI related features as I have only compiled Vim on a server.\n\nVim source is in a hg (Mercurial) repository so you need to install the hg\nclient first, e.g.  `sudo apt-get install mercurial`.\n\n    hg clone https://vim.googlecode.com/hg/ vim\n    cd vim/vim73\n    ./configure\n    ./configure --with-features=huge --enable-cscope --enable-pythoninterp --enable-rubyinterp --enable-perlinterp --enable-multibyte\n    make\n    sudo make install\n\nThis installs Vim to `/usr/local/bin,` check this is in your `$PATH` before `/usr/bin` which may contain an older system version of Vim.\n\nIf you get an error `no terminal library found` install `libncurses5-dev`.\n\n### Install these vimfiles\n\nNote: You will already have a `~/.vim` folder, either delete or move it.\n\n    mv ~/.vim ~/.vim.old\n    git clone https://github.com/krisleech/vimfiles ~/.vim\n    cd ~/.vim\n    rake install\n\nor run:\n\n    curl https://raw.github.com/krisleech/vimfiles/master/bootstrap.sh -o - | sh\n\n#### To update to the latest vimfiles\n\n    cd ~/.vim\n    rake update\n\n#### Install Dependacies\n\n*MacOS*\n\n    brew install ack\n    brew install ctags\n\nNote: MacOS comes with the BSD version of ctags which is not compatible.\n\n*Ubuntu*\n\n    sudo apt-get install exuberant-ctags\n    sudo apt-get install ack-grep\n    sudo ln -s /usr/bin/ack-grep /usr/local/bin/ack\n\n## Helpful Stuff\n\n- http://github.com/krisleech/vimfiles/wiki\n- http://walking-without-crutches.heroku.com/image/images/vi-vim-cheat-sheet.png\n- http://yehudakatz.com/2010/07/29/everyone-who-tried-to-convince-me-to-use-vim-was-wrong/\n- http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118\n- http://stevelosh.com/blog/2010/09/coming-home-to-vim/#important-vimrc-lines\n- `:help key-notation`\n- http://vimcasts.org/\n\n## Acknowledgments\n\n- Tim Pope (of course) http://tpo.pe/\n- https://github.com/carlhuda/janus\n- https://github.com/rson/vimfiles/blob/master/plugins.vim\n- https://github.com/codegram/vimfiles\n- https://www.destroyallsoftware.com/file-navigation-in-vim.html\n- https://github.com/alexreisner/dotfiles/blob/master/.vimrc\n- http://items.sjbach.com/319/configuring-vim-right\n- https://github.com/sickill/dotfiles/blob/master/.vimrc\n- #vim on freenode\n - woldrich\n - spiiph\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrisleech%2Fvimfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrisleech%2Fvimfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrisleech%2Fvimfiles/lists"}