Search This Blog

06 August, 2015

Turning off expandtab in VIM for editing makefile

if you had set the .vimrc to change the tab to spaces for C programming, it will be difficult to edit or create makefiles,

 i had trouble creating makefile , i was getting the below error

Makefile:18: *** missing separator.  Stop.


after googled little and  found the  solution, edit the .vimrc file like below



let _curfile = expand("%:t")
if _curfile =~ "Makefile" || _curfile =~ "makefile" || _curfile =~ ".*\.mk"
set noexpandtab
else
set expandtab
set tabstop=4
set shiftwidth=4
endif

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...