I’ve tried to set the path to my project’s ctags file each time when I close the *.c file and go to terminal. I want the tags file to have been set when I open my code file. Or, maybe … can I set the tags file only for special directory? Answer Usually the path of the ctags file is
Tag: vim
auto-formating tool for django html template files
Is there a *nix tool (or vim plug-in) that would allow me to automatically format django html template files? Hitting the space bar hundreds of time does not sound like a good use of my time but then neither does leaving some weird formatting that is hard to read. Answer Install vim-jinja2-syntax plugin by putting Glench/Vim-Jinja2-Syntax when installing it with
How to convert multiple letters to uppercase in vim?
I need to change all lowercase letters e, s, t, and a to uppercase letters in a text file in vim. I tried using :%s/e/E/g for all letters but I couldn’t find a better solution. I want to do it using the command, not via visual method. Answer Try this using %s.Capture the pattern first; and then change the captured
Inserting text in vim causes each line to be shifted right
When I copy some text from one opened window (browser and text editor) to vim by pressing Shift + Insert, The text is inserted in a way that each consecutive line is shifted right with progressive amount of tabs. Meaning that second line is shifted by 1 tab, 3rd line is shifted by 2 tabs, 4th line is shifted by
Cannot go to the line of the reference
I recently installed cscope Vim plugin to make it easier to jump through code, but the main functionality – go to line, does not work. I have F2 key mapped to “Find all references”. When I select a function call for example, and press F2, I get the list of all the references, and the first reference is usually the
Vim Starts on Insert Mode and Inserts Special Characters
So vim just suddenly started flaking out on me today and I can’t pinpont the problem. Haven’t touch the configuration file and the last thing I worked on before I noticed the problem was updating my sshd_config and sshd_config.pacnew files. What I noticed is that upon opening the sshd_config file is vim starting out in insert mode and automatically inserted
Provide vim syntax highlighting system wide by debian package
I wrote a custom software using its own configuration files under /etc. The software is built in a Debian package and delivered by a custom repository. In order to provide a nice syntax highlighting in vim I wrote all the necessary files to nicely highlight my own config files. If I place them under ~/.vim/syntax and add a line to
Change key binding for autocomplete in haskell-vim-now
I have installed the Vim plugin haskell-vim-now in Ubuntu 14.04 LTS and in Xubuntu 14.04 LTS. After using the plugin in Ubuntu, I could use the autocompletion with Ctrl-space. However, when I installed it in Xubuntu, the Ctrl-space key would not work. The only way I made the autocompletion work was with the key Ctrl-@. I looked in the .vimrc
How to make z= look like ctrl-x s in vim spell check
So in insert mode if you hit ctrl-x s on a misspelled word you get a nicely formatted popup menu of spelling suggestions. This is awesome. The comparable command in normal mode (z=), however, gives a bland plain-text list that eats the whole screen. I’ve partially solved this by adding the following keybinding in my .vimrc: nnoremap <Leader>s ea<C-X><C-S> This
How can I launch vim from my program and capture the written output, like Git commit
Like the title suggests, I’d like to basically emulate the behavior of git commit where it launches a text editor and when you save the output, it captures the output. Anyone have an idea of how to do this? I tried to look through the git source to copy the solution but didn’t really succeed in finding the relevant portion.