Thursday, September 26, 2013

Building Vim plugin from Sources

Well, the following link gives some information on how to build gvim from sources and along with important info on how to build from sources in general:

http://aufather.wordpress.com/2010/08/15/building-gvim/

Now I seem to go back to the following link:

https://github.com/Valloric/YouCompleteMe/issues/1

I did not find any link which says how to build a plugin from sources. So what should I do? Let me go to github page of YCM (YouCompleteMe) and see whether I can get the source file.

Well It's  official page has all the information of how to recompile YCM:

https://github.com/Valloric/YouCompleteMe

I was such a fool not to read it through. Here are the specific instructions from above link:

Remember: YCM is a plugin with a compiled component. If you update YCM using Vundle and the ycm_core library API has changed (happens rarely), YCM will notify you to recompile it. You should then rerun the install process.

Install development tools and CMake: sudo apt-get install build-essential cmake

Make sure you have Python headers installed: sudo apt-get install python-dev.

Compiling YCM with semantic support for C-family languages:
cd ~/.vim/bundle/YouCompleteMe
./install.sh --clang-completer
 
 
Compiling YCM without semantic support for C-family languages:
cd ~/.vim/bundle/YouCompleteMe
./install.sh

Building Vim from sources

It was required to build Vim from sources since plugin like YouCompleteMe requires newer version.

Download the source files from the following link:

ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2

This is given in official download page of Vim:

http://www.vim.org/download.php#unix

hg clone method produced error. So I went to uncompressed folder of the above tar file and followed the following procedure:

cd vim
./configure --with-features=huge \
            --enable-rubyinterp \
            --enable-pythoninterp \
            --with-python-config-dir=/usr/lib/python2.7-config \
            --enable-perlinterp \
            --enable-gui=gtk2 --enable-cscope --prefix=/usr
make VIMRUNTIMEDIR=/usr/share/vim/vim74
sudo make install

The above instruction has been taken from the following site:

https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source

But then it produces an error that whenever GVIM runs it says YCM needs to be built from the source.

Here someone is trying to do that but encountering problems:

https://github.com/Valloric/YouCompleteMe/issues/1

So search google for ways to build a plugin from source.

Wednesday, September 25, 2013

Summarizing my experience with Linux

I had some torrid time with Linux installation. Ubunut 13.04 and it's derived distros like LUBUNTU, XUBUNTU  all had  "buffer overflow" error in R while installing new packages. After much trial and tribulations I settled down with Ubuntu 12.04 LTS. After a week, I am quite happy with it. R works just fine but it had the problem of resuming from suspension. The same problem I had in MINT 15.  Following patch from here worked out just great. I am ever grateful for that. Otherwise I would have been still in limbo.

Fix Suspend

From “unziberla” in the comments below:
Guys, i fixed suspend on my AO751h with 12.04 starting from old patch for 11.10 from which i removed one quirk.
Open a terminal and use the following commands:
gksu gedit /etc/pm/config.d/gma500
Add in one of the following codes and save the file (apparently one “-” works for some and others need two “--” in front of “quirk-vbemode-restore”):
ADD_PARAMETERS='-quirk-vbemode-restore'
ADD_PARAMETERS='--quirk-vbemode-restore'
This has been a life changer. No doubt about that.

Sunday, September 22, 2013

Pathogen from github seems faulty

In one of my previous post I described how to download pathogen for vim. But downloading it from github gives all kinds of errors. Better method is to go to the vim scripts archive , download pathogen.vim file to the autoload folder. I have no idea why this would happen but it just happened .

Installing Dropbox in Ubuntu

I think the best way to download is by wget as mentioned in dropbox official site.

Installing pathogen for vim in Ubuntu

Copy and pasting from the link here: 

Slighty modified the url of github:

mkdir -p ~/.vim/autoload ~/.vim/bundle;
curl -Sso ~/.vim/autoload/pathogen.vim https://github.com/tpope/vim-pathogen/tree/master/autoload
If the above doesn’t work because you don’t have curl installed, that is easy to remedy


sudo apt-get install curl
If you are new to vim and do not have a .vimrc file, create one with vim:
vim ~/.vimrc
and paste the following lines in a minimal .vimrc file 

" Pathogen
execute pathogen#infect()
call pathogen#helptags() " generate helptags for everything in 'runtimepath'
syntax on
filetype plugin indent on

Changing Computer's name in linux

You have to change the computers hostname as well.
Edit the hostname file and replace the name
gksudo gedit /etc/hostname
also change the name in hosts
gksudo gedit /etc/hosts
Leave the other stuff there untouched.
For the username, it would be cleaner if you deleted the old user and created your new one.