Skip to content

arangan-config/dotvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation:

On LINUX, MAC or Nixes
=======================
  git clone git://github.com/arangan/dotvim.git ~/.vim

Create Symlinks:

  $ ln -s ~/.vim/vimrc ~/.vimrc
  $ ln -s ~/.vim/gvimrc ~/.gvimrc
  
  cd ~/.vim
  git submodule update --init

Either make links to local file or create your own local file
--------------------------------------------------------------
  $ ln -s ~/.vim/vimrc.local ~/.vimrc.local
  $ ln -s ~/.vim/gvimrc.local ~/.gvimrc.local

On Windows
===========
  git clone git://github.com/arangan/dotvim.git %HOMEDRIVE%%HOMEPATH%\vimfiles
  or
  download the repository and unzip to %HOMEDRIVE%%HOMEPATH%\vimfiles

  C:\> mklink  %%HOMEDRIVE%%HOMEPATH%\_vimrc HOMEDRIVE%%HOMEPATH%\vimfiles\vimrc
  C:\> mklink  %%HOMEDRIVE%%HOMEPATH%\_gvimrc HOMEDRIVE%%HOMEPATH%\vimfiles\gvimrc

Either make links to local file or create your own local file
--------------------------------------------------------------
  C:\> mklink  %%HOMEDRIVE%%HOMEPATH%\_vimrc.local HOMEDRIVE%%HOMEPATH%\vimfiles\vimrc.local
  C:\> mklink  %%HOMEDRIVE%%HOMEPATH%\_gvimrc.local HOMEDRIVE%%HOMEPATH%\vimfiles\gvimrc.local

   cd ~/vimfiles
   git submodule update --init

Always play with the vimrc.local and gvimrc.local files


GIT Help
=========
SETUP initial repo
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/arangan/dotvim.git
git config --global user.name arangan
git push -u origin master

Check your settings
git config --list

if you want to fix the settings after a commit
git commit --amend --reset-author

List current pull and push urls
-------------------------------
$ git remote -v
or
$ git remote list
or
$ git remote show origin

origin  git://github.com/arangan/dotvim.git (fetch)
origin  git://github.com/arangan/dotvim.git (push)


Set git remote url
------------------
$ git remote set-url origin https://github.com/arangan/dotvim.git    (This will change both the push and pull URLs)
$ git remote set-url --push origin https://github.com/arangan/dotvim.git    (This will change only the push URLs)



Commit to Github
----------------
$ git add .
$ git commit -m "my message"
$ git push origin master


To delete a directory from git
------------------------------
$ git rm -f /my/folder


Show all SHA1 for recent commits
--------------------------------
$ git log
$ git rev-parse HEAD
$ git rev-parse --short HEAD   (just show the short hash)

$ git ls-remote --heads origin (Show the remote origin's hash)


List all the changed files
--------------------------
$ git diff --name-only SHA1 eg. 3e135f98887d2c87bc77f8b3ebdbeb01586d9d4a
.netrwhist
tags
vimrc

Revert back all the changes
---------------------------
$ git reset --hard
HEAD is now at 3e135f9 major clean up. Files properly created

Revert changes to only one file
-------------------------------
$ git checkout -- filename       <-- this basically pulls the file from the last commit.

Other variations
$ git checkout stable -- filename  <-- checkout from the stable branch
$ git checkout origin/master -- filename 
$ git chechout HEAD -- filename   <-- the version from the most recent commit
$ git checkout HEAD^ -- filename  <-- the version before the most recent commit


Submodules
===========
git submodule add https://github.com/jlanzarotta/bufexplorer.git bundle/bufexplorer
git submodule add https://github.com/kien/ctrlp.vim.git bundle/ctrlp.vim
git submodule add https://github.com/scrooloose/nerdtree.git bundle/nerdtree
git submodule add https://github.com/ervandew/supertab.git bundle/supertab
git submodule add https://github.com/scrooloose/syntastic.git bundle/syntastic
git submodule add https://github.com/majutsushi/tagbar.git bundle/tagbar
git submodule add https://github.com/jeetsukumaran/vim-buffergator.git bundle/vim-buffergator
git submodule add https://github.com/altercation/vim-colors-solarized.git bundle/vim-colors-solarized

About

My VIM Config files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors