Git Product home page Git Product logo

vimrc's Introduction

Vimrc

Features

  • very good documentation, almost every line of code is documented
  • lots of useful key short-cuts, Macros, Commands etc. (see below)
  • uses Vundle to manage plugins
  • easily customizable
  • custom status-line
  • allows user-specific ~/.vimrc
  • allows project specific vimrc ;)

Plugin management with Vundle

All used plugins are managed via Vundle. If you don't know it, stop reading and check it out right now! This VIm setup requires Vundle, and it is recommendet to install it before deploying this configuration. To install all mentioned plugins, simply do :PluginInstall.

User-specific ~/.vimrc (DEPRECATED)

This vimrc automatically sources a ~/.vimrc, if available. Make sure, the command to source ~/.vimrc remains at the end of this vimrc, otherwise user-specific commands may be overwritten.

IMPORTANT: If you store the vimrc as ~/.vimrc, you have to remove the line that sources ~/.vimrc, else there is a cyclic dependence!

Project-specific vimrc

When VIm starts, it auomatically sources the .project.vim file from the current directory, if available. This allows you to adapt VIm to specific projects.

Keymap

Mode Keys Effect
n,i,v,c,o Alt + Q like Esc (trust me, you will love this)
n,i Alt + W automatically wrap the text at text width (like gwgw)
i Alt + F file completion deprecated, rely on YCM's automagic path completion
n Space toggles between regular line numbering and hybrid mode
n BackSpace removes all trailing whitespaces
n Tab switch to next tab
n Shift + Tab switch to previous tab
n Ctrl + N creates a new tab, and prompts the file open dialog
n Alt + N creates a new vertical window, and prompts the file open dialog
n Ctrl + C toggle comment for the current line/block (NERDCommenter)
n ,ff switches to the alternate file (FSwitch)
n ,fh opens the alternate file left of the current window (FSwitch)
n ,fj opens the alternate file below the current windo (FSwitch)
n ,fk opens the alternate file above the current windo (FSwitch)
n ,fl opens the alternate file right of the current windo (FSwitch)
n Alt + J opens the tag list selection window (ctags)
v * forward search for the visually marked text
v # backwards search for the visually marked text
i,c F1 opens the VIm help
n F2 opens the NERD Tree (NERD Tree plugin needed)
n F3 toggles Spell on/off
n F5 toggles the TagList window (TagList)
n F6 shows compiler messages
n,i F12 inserts the current date and time

Status Line

The status line is kept minimalistic. I didn't want a blown-up thing like Powerline. For this reason everything is left aligned. When you intermix tabs with white spaces for indentation, have trailing white spaces, or have lines longer than text width, the status line will show a short warning. (See Screenshot #2)

Commands

Command / Function Effect
Untab2 replaces all tabs by 2 spaces
Untab4 replaces all tabs by 4 spaces
V <cols> vertically resize the current window to <cols> columns
Ctags <PATH> creates a C tags file for all files in the specified directory (subdirectories included)
Cpptags <PATH> creates a C++ tags file for all files in the specified directory (subdirectories included)
Cstags <PATH> creates a C# tags file for all files in the specified directory (subdirectories included)

Used Plugins

  • Spell
  • YouCompleteMe
  • FSwitch
  • Taglist
  • NERD Tree
  • NERD Commenter
  • Solarized Color Scheme

Screenshots

Screenshot 1 Screenshot 2

vimrc's People

Contributors

immanuelhaffner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.