这是indexloc提供的服务,不要输入任何密码
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jez/vim-as-an-ide
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: mesutcan/vim-as-an-ide
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 14 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 25, 2015

  1. Set up Pathogen boilerplate

    We're going to be using the Vim plugin manager called Vundle.
    
    NOTE
    
    For this talk, I'm assuming that you're starting from a blank slate. If
    you have a ~/.vim folder, move it out of the way:
    
        mv ~/.vim ~/.vim.old
    
    INSTALLATION INSTRUCIONS
    
    Before making these changes, you'll need to install Vundle. Run this
    command to install it:
    
        git clone https://github.com/gmarik/Vundle.vim
    ~/.vim/bundle/Vundle.vim
    
    This installs Vundle.vim to a subdirectory of your ~/.vim folder. We'll
    be using Vundle in upcoming steps to add lots of plugins!
    
    The changes we made in this step are outlined right on the front page of
    the Vundle project page on GitHub. They're just stock changes that need
    to be made for Vundle to work.
    jez committed Feb 25, 2015
    7 Configuration menu
    Copy the full SHA
    1186be2 View commit details
    Browse the repository at this point in the history
  2. Make Vim look good

    To make Vim look good, you can install extra color schemes. For the
    purposes of this demo, I've chosen two: Solarized (the most widely used
    color scheme) and Molokai (a port of the Textmate/Sublime color scheme).
    Feel free to pick one by changing the
    
        colorscheme solarized
    
    line to something else.
    
    To make Solarized look the best, you're going to want to install the
    corresponding colorscheme for your terminal:
    
        http://ethanschoonover.com/solarized
    
    If you can't do this, just uncomment the line that says
    
        let g:solarized_termcolors=256
    
    We're also installing a plugin called vim-airline that makes Vim look
    pretty awesome. It adds tons of information to your Vim and adds style
    too. It works best if you have what's called a "patched font". There are
    a number of patched fonts that you can install, but the one I recommend
    is
    
        https://github.com/abertsch/Menlo-for-Powerline
    
    Once you've downloaded all the .ttf files, change your font in your
    terminal emulator.
    
    NOTE FOR WINDOWS USERS (you poor souls...)
    
    Setting up Solarized and vim-airline is basically impossible on PuTTY.
    Instead, you should go download mobaXterm, which is an SSH client that
    lets you a) comes pre-installed with Solarized colors and b) lets you
    choose a patched font:
    
        http://mobaxterm.mobatek.net/
    
    For detailed installation instructions and a sneak peak at some of it's
    more powerful features, see here
    
        http://blog.zimmerman.io/2014/09/28/setting-up-mobaxterm-for-ssh-on-windows/
    jez committed Feb 25, 2015
    4 Configuration menu
    Copy the full SHA
    457f2e2 View commit details
    Browse the repository at this point in the history
  3. Plugins NERDTree and NERDTree Tabs

    These two plugins let you view your project's files in a sidebar similar
    to Sublime or your favorite IDE.
    jez committed Feb 25, 2015
    7 Configuration menu
    Copy the full SHA
    b7ff90c View commit details
    Browse the repository at this point in the history
  4. Plugin Syntastic

    Syntastic gives you error checking for just about every language
    imaginable right from within Vim! It shows you the offending line next
    to the line numbers.
    jez committed Feb 25, 2015
    10 Configuration menu
    Copy the full SHA
    144f979 View commit details
    Browse the repository at this point in the history
  5. Plugins vim-easytags and tagbar

    These give you the power to see what kinds of methods, variables,
    functions, and other types of declarations you have in your files. It
    relies on a program called ctags being installed, and normally you have
    to run ctags to generate the `tags` file for the plugin to work.
    Luckily, there is another plugin that makes generating this tags file
    easy: vim-easytags. It automatically generates the tags file in the
    background whenever you save, so you never have to worry about the tags
    file getting out of date.
    
    If you're wondering why `tags` files start showing up in random places,
    this is it.
    jez committed Feb 25, 2015
    5 Configuration menu
    Copy the full SHA
    fd2c49c View commit details
    Browse the repository at this point in the history
  6. Plugin ctrlp

    ctrlp is a magical Vim plugin for finding files quickly. It lets you
    "fuzzy find" files, which you'll be familiar with if you use Sublime a
    lot. Basically, you can type a subset of the letters in a file's name,
    and the plugin will be smart enough to figure it out.
    jez committed Feb 25, 2015
    7 Configuration menu
    Copy the full SHA
    80db74f View commit details
    Browse the repository at this point in the history
  7. Plugin A.vim

    A.vim (or "Alternate.vim") is a plugin for opening header files
    automatically. Say you're working on your 15-213 homework and you've got
    up the cache.c file. Simply type :AT to open up the alternate file
    (i.e., cache.h). It works in the other direction as well.
    jez committed Feb 25, 2015
    4 Configuration menu
    Copy the full SHA
    8d4223f View commit details
    Browse the repository at this point in the history
  8. Plugins vim-gitgutter and vim-fugitive

    These plugins make working with Git a sinch.
    
    vim-gitgutter shows a +/-/~ next to lines that have been added, removed,
    and modified, and also shows a summary of the number of lines affected
    in vim-airline's statusbar.
    
    vim-fugitive makes working with Git from within Vim incredibly easy.
    Here's a lit of common commands and their analogs to the normal git
    commands:
    
    - git add                  --> :Gwrite
    - git commit               --> :Gcommit
    - git push                 --> :Gpush
    - git checkout <file name> --> :Gread
    - git blame                --> :Gblame
    - ... many more!
    jez committed Feb 25, 2015
    2 Configuration menu
    Copy the full SHA
    1e5757e View commit details
    Browse the repository at this point in the history
  9. Plugin delimitMate

    Finally, we've made Vim smart enough to insert matching delimiters, like
    quotes, parentheses, and curly braces, automatically!
    jez committed Feb 25, 2015
    4 Configuration menu
    Copy the full SHA
    2fe0507 View commit details
    Browse the repository at this point in the history
  10. Plugin vim-superman

    This plugin actually allows you to view man pages in Vim! Just add the
    text
    
        vman() {
          vim -c "SuperMan $*"
    
          if [ "$?" != "0" ]; then
            echo "No manual entry for $*"
          fi
        }
    
    to your ~/.bashrc, ~/.zshrc, or other config file, and then run
    
        vman git
    
    to open the man page for git in Vim!
    
    You can also press K on a word in Vim to bring up the man page for that
    word.
    jez committed Feb 25, 2015
    3 Configuration menu
    Copy the full SHA
    b185e9f View commit details
    Browse the repository at this point in the history
  11. Plugin vim-tmux-navigator

    Even if you don't use tmux (a command line program for managing multiple
    terminal windows), this is a handy plugin to have. It lets you move
    around through splits (like the ones that get created by NERDTree and
    tagbar) using the shortcuts
    
                           ^
                           |
        <-- C-h    C-j    C-k    C-l -->
                    |
                    v
    
    However, it's even more powerful when combined with tmux, because it
    lets you switch between Vim splits and tmux panges with the same combos
    if you add the following snippet to your ~/.tmux.conf file:
    
        # from <https://github.com/christoomey/vim-tmux-navigator>
        # Smart pane switching with awareness of vim splits
        is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
        bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
        bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
        bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
        bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
        bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
        # restore overwritten C-l binding (clear screen)
        bind C-l send-keys 'C-l'
    
    tmux is a pretty great program. You should definitely Google for how to
    use it. If you're looking for a sample ~/.tmux.conf to get you started,
    I have mine at
    
        https://github.com/jez/dotfiles/blob/master/tmux.conf
    jez committed Feb 25, 2015
    2 Configuration menu
    Copy the full SHA
    44f5225 View commit details
    Browse the repository at this point in the history
  12. Syntax plugins

    While Vim has a ton of built-in support for different languages'
    syntaxes, sometimes for cutting edge stuff it falls behind. In these
    cases, a quick search will usually turn up a syntax highlighting plugin
    for the file you need!
    
    Here we've included a few examples of this. Feel free to delete the ones
    you don't need and search for more to add that you do.
    jez committed Feb 25, 2015
    2 Configuration menu
    Copy the full SHA
    5ba534e View commit details
    Browse the repository at this point in the history
  13. Add all the extra plugins that I use

    I a number of plugins that I don't find general-purpose enough to force
    upon everyone, but it's nice to be able to get an idea for what's out
    there. Feel free to peruse these plugins at your leisure.
    jez committed Feb 25, 2015
    4 Configuration menu
    Copy the full SHA
    9089a95 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2015

  1. Add README

    jez committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    7227646 View commit details
    Browse the repository at this point in the history
Loading