mercredi 24 juillet 2013
RSI, Repetitive Strain Injury. CTS, Carpal Tunnel Syndrome.
mercredi 17 juillet 2013
unite.vim and many files in a project
I'm using the ag command in conjunction with the unite.vim plugin.
If your project contains many files, for example 100k files, you might be experiencing slowness while using the unite.vim file_rec or file_rec/async sources. Vim might even use 100% of your cpu.
One solution is to populate the .agignore file so unite.vim will only be working with a reduced set of your project's file. Here's the little shell script, please fill in the correct values for your project:
#!/bin/sh APP_DIR=path_to_your_project AG_IGNORE_FILE=.agignore # A list of directories or files you want unite.vim to inspect. # You can put as many as you like, separated by a pipe. WHITE_LIST='directory_1|directory_2|directory_3' ls -1 $APP_DIR | grep --color=never -v -P "($WHITE_LIST)" > ~/$AG_IGNORE_FILE
Compile vim by yourself
Here is a short howto on compiling vim by yourself on an ubuntu os. You should have lua dev, python dev and ruby dev packages installed to support vim's lua, python and ruby integration.
~% mkdir src && cd src ~% hg clone https://vim.googlecode.com/hg/ vim ~% cd vim ~% hg pull ~% hg update
In ~/src/vim/src/Makefile here are the options I've uncommented:
CONF_OPT_GUI = --disable-gui CONF_OPT_LUA = --enable-luainterp CONF_OPT_PYTHON = --enable-pythoninterp CONF_OPT_RUBY = --enable-rubyinterp CONF_OPT_FEAT = --with-features=big CONF_OPT_COMPBY = "--with-compiledby=inside" CONF_OPT_X = --without-x
Then type:
~% make
~% sudo make install
If you change anything in the src/Makefile be sure to type:
~% make reconfig
in order to take changes into account.