From their start standing on the shoulders of dotfile giants like sontek, jtratner's dotfiles have begun to slowly evolve in their own right.
What's In Here
git clone https://github.com/jtratner/dotfiles.git .dotfiles cd .dotfiles rake install ./bin/updatesubmodules
My setup is different than that of sontek and others, because I like to be able to individually control bundles on each machine, so I use symlinks to each directory. Plus, if you need to remove a bundle, you don't have to go through the annoying hassle of removing it from your gitmodules first. But you should do what works for you.
- Two options (for now):
- Run
rake install
- prompts you to back up or overwrite your files, you'll still need to update submodules (use theupdatesubmodules.sh
) script in the bin. - Run
install.sh
- sets up dotfiles and updates submodules + will back up your files to .bak
- Run
The vimrc.symlink
file is pretty well documented. You could also go read
sontek's description of his dotfiles for more in-depth info on many of
these plugins. I'm just going to mention the changes I've made since
'forking'(ish) sontek's dotfiles. More info will come over time
- syntastic - makes it real easy to check the syntax on any filetype (just
have to have the parser installed. I have
docutils
(rst),pyflakes
,pep8
(for python) installed at the moment, to name a few). - Hammer
:Hammer
, converts your current lightweight-markup file to HTML. - vim-ipython - hands down the best tool to help you code in python lets you connect to ipython, which is a fabulous suite for
- VOom - simple but very useful vim application. Creates a two-pane outline
window that allows you to browse the structure of your files (or
classes/functions in python ,etc). For example if you run
:Voom
on this file, you'll see a neat directory tree that you can use to navigate the file. Also has a useful in-file grep. - tComment - handy for easily commenting/uncommenting sections
- snipmate - (updated to garbas' new version + added the snippet repository)
- Powerline - better vim status bar. NOTE: You have to install a patched font to use it. Luckily, there are some included in fonts/fonts.symlink/ that'll be installed automatically. Yay!
- Ctrl-P - like
Command-T
but on steroids + no ruby required. Just type<ctrl-P>
and your
:Underline <arg>
and:Title <arg>
where<arg>
is a character or number underline or 'box':
some vim text ":Un 2 some vim text ------------- A title ":Ti = ======== A title ========
Mapping | Mnemonic | Settings |
---|---|---|
<leader> en | 'edit normal' | tw=78; fo+=t, colorcolumn+=0 |
<leader> ec | 'edit comment' | tw=72; fo+=t, colorcolumn+=0 |
<leader> ed | 'edit done' | restore defaults (or tw=80,fo-=t, colorcolumn=0) |
<leader> p | 'paste' | paste from clipboard |
<leader> y | 'yank' | yank to clipboard |
<S-C-V> | (normal paste) | paste from clipboard |
<S-C-C> | 'copy' | yank to clipboard |
Q | 'quick form'? | format the current paragraph |
Command | Notes | Settings |
---|---|---|
:SetFont | use to quickly change font in gvim | |
<F3> | toggle VoOM | |
:DiffSaved | Show diffs between current file and saved file |
Easiest way: sudo apt-get build-dep vim-gnome
(if you're
using unity)
- Mac : I think you can get MacVim which should have everything
- Windows : The
vim.symlink
files will be helpful, but note that it has to be undervimfiles
, not.vim
- Handling dependencies - there are a ton and, unfortunately, vim doesn't
always tell you that you've managed to get all the ones you want. I used to
have an install script[1]_, but it really varies a ton by platform.
- Ubuntu (and Linux generally) there's a raft of libraries, but the most
important to grab are:
xorg-dev python-dev ruby ruby-dev
as well as a raft of ncurses libraries. - Mac Check out homebrew
- Ubuntu (and Linux generally) there's a raft of libraries, but the most
important to grab are:
- The easiest way to setup vim and be sure that you have the features you want is to grab the tarball from the vim homepage, and configure it with[2]
./configure --enable-pythoninterp --enable-rubyinterp --enable-gui --with-features=huge --prefix=$HOME/path/to/directory `
- Go to your directory where you installed vim and check that you got the right version with
./vim --version
- If you did it correctly, you'll get a huge amount of input with
+
and-
. Most important thing is to check that you had the following:+python
+ruby
(if you want Command-T)+xterm-clipboard
(if on Linux w/ X11) or another+clipboard
entry -- you need this to be able to copy/paste from the clipboard.
- Install git. (e.g.
sudo apt-get install git
) - Pick a directory, then clone these dotfiles with (it'll automatically add it
to a folder called 'dotfiles' unless you specify a different folder after the
clone e.g.
git clone https://github.com/jtratner/dotfiles.git mydotfilecollection/jtratner
):
git clone https://github.com/jtratner/dotfiles.git
- Get an account on github, follow their instructions and come back after a bit. Fork the dotfiles yourself. (click on the fork button ;))
- Initiate a git repository, then add your fork of dotfiles on github as a remote. Finally, download your files.
mkdir dotfiles cd dotfiles git init git remote add origin git@github.com:*username_/_yourrepository*.git git pull origin master
- Go into the dotfiles directory, run
./install.sh
in the command line. BOOM! You are halfway done.
- Change into the
_vim
subfolder (cd *vim
) - To activate all the bundles in a folder, you can run the
symlinkdirectory
script[5]
./symlinkdirectory bundle-available bundle
- That script created symlinks in the bundle folder to all the plugins in
bundle-available. To choose just the plugins you want, add or delete some or
use
ln -s
to create new ones[5]_. Bundle-disabled and testing contain additional plugins that you might try out. Or add your own!
- Rope and nose you can get through
easy_install
orpip
(I prefer pip)
pip install rope nose
- Ack you have to get as a package (e.g.
apt-get install ack
or through homebrew) virtualenv
- highly useful, you probably want it. (I list it last because the previous items need to be installed system-wide)
pip install virtualenv virtualenvwrapper virtualenvwrapper.sh
Now you should be able to just run your file and have everything work. Whee!
Preface This ought to work:
easy_install ipython[zmq,qtconsole,notebook,test]
It never works for me. You can install IPython with pip
/easy_install
, you
just have to get the dependencies first. Before you do, you might also check out
the IPython website and its guide to installation
- Getting python dependencies (you may already have some or all of these) Note that matplotlib, scipy, and numpy are only required if you want to run pylab; however I highly suggest that you get them because they are very useful and pretty darn cool
pip install nose tornado pygments pyzmq pexpect distribute matplotlib scipy numpy
- Getting Qt This can be more or less of an ordeal, depending on your system.
Do yourself a favor: try to find a precompiled binary first it will be far
easier. Seriously. Otherwise, you'll probably need to get
SIP
,PyQt
andQt
online. (TODO: write instructions for this. For now, Google search is your friend.) - Install IPython Okay, actually this is pretty easy now! Yay!
pip install ipython
- Check that it's working Run IPython's testing suite. Read the output to make sure you aren't missing any libraries.
iptest
- If it fails,
- It's okay. Happened to me too.
- Read the output of iptest, see if it gives any info. (google is your friend).
- Check that you have all the dependencies.
- Try uninstalling and reinstalling IPython.
- If it's not fixed by now, try Google, Stack Overflow or the IPython website
[2] | The easiest way is to download and install a precompiled version. On Ubuntu, vim-gnome has most of what you want. |
[3] | I set up a different home directory and then symlink it to my local bin, that way I can still use the default system editor as needed (say if xwindows crashes or something :P) |
[4] | Here's the whole list: |
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr 19 2012 21:01:31) Compiled by root@openwater Huge version with GTK2 GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +persistent_undo +postscript +printer +profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/home/jtratner/vimpyru/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/local/include -g -O2 -D_FORTIFY_SOURCE=1 -I/usr/lib/ruby/1.8/i686-linux -DRUBY_VERSION=18 Linking: gcc -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -L/usr/local/lib -o vim -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXt -lncurses -lselinux -lacl -lgpm -L/usr/lib/python2.7/config -lpython2.7 -lutil -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lruby1.8 -lrt -lm