Giter Club home page Giter Club logo

dot-vimrc's Introduction

This repository contains my configuration for vim.

To use it, clone it into into your .vim directory, then run the setup script:

git clone https://github.com/jasonk/dot-vimrc ~/.vim
cd ~/.vim
./setup.sh

WARNING: If you have an existing ~/.vimrc or ~/.gvimrc file, the setup script will delete them!

Customizing your configuration

If you are going to customize your configuration, you will probably want to fork the repo on Github before cloning it as above. Just go to https://github.com/jasonk/dot-vimrc (login to Github if necessary) and then click the 'Fork' button to create your own fork in your own account. Then just follow the instructions above, and replace 'jasonk' with your own Github username.

Directory Layout

The directory layout I'm using is fairly simple, and makes sense to me, but there is no reason you have to do it that way, you can do whatever you want.

Within the .vim directory, I tend to organize configuration by the type of configuration it is:

abbreviations.vim

Abbreviations.

autocmds.vim

Automatic Commands.

bundle

This is the directory where Vundle will install it's bundle files. You should not track this in your repository (that's why it's listed in .gitignore) and you shouldn't modify anything in here as this directory will get rebuilt whenever you run setup.sh

If you want to change the configuration of the plugins that Vundle is installing, see the 'plugins' directory below.

commands.vim

Commands.

functions.vim

Functions.

mappings.vim

Mappings.

os-mac.vim

Settings specific to Mac OS X.

os-windows.vim

Settings specific to Windows. See "Notes for Windows Users" below.

plugins

Settings for Vundle plugins. See "Configuring Plugins" below.

plugins.vim

This file is automatically generated by setup.sh, you shouldn't modify it. See "Configuring Plugins" below.

settings.vim

General settings.

setup.sh

A shell script that generates the configuration necessary for Vundle to work and does some additional setup of plugins as needed.

See "Configuring Plugins" below.

vimrc

The main vimrc file, all it does is import other configuration files.

Configuring Plugins

The files in the plugins directory are the configuration for individual plugins. In order for setup.sh to install them correctly, each file needs to include at least one comment line that starts with the word 'Plugin' and identifies the plugin to be installed. Look at some of the existing ones for an idea of how it works. The setup.sh script will generate a plugins.vim file that loads each of those plugins and then sources the file itself. So although some of the plugins only include a comment line (since they don't need any additional configuration) you can also put any configuration for that plugin in this file.

You can also put more than one plugin per file (for an example of this, look at plugins/javascript.vim).

In addition to the *.vim files that are in this directory, you can also include *.sh files if there is any additional setup that needs to be done by setup.sh for that plugin to work. For an example of this look at the javascript.vim and javascript.sh files: javascript.vim includes a plugin called 'tern_for_vim' which requires a nodejs service to be installed. The javascript.sh file makes sure this gets installed.

Note that the name of the .sh file must match the name of a .vim file. This is an attempt to prevent the .sh files from running if the plugin has been disabled. So, for example, if you remove the plugins/javascript.vim file then the plugins/javascript.sh file will not run even if you forget to remove it.

Notes for Windows Users

I hardly ever use Windows, so the Windows-specific settings here are probably not all that exciting. You are also on your own trying to get things installed on Windows, but here are some links to get you started:

http://www.vim.org/download.php#pc https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows

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.