Skip to content
Advertisement

Tag: vim

don’t apply current options to new opened file vim

I frequntly open many files in vim. The problem is some files have their own options. For example: settings for make files settings for C files So, if I open makefile first and then :tabe main.c I can see invisble character that were turned on from makefile. I understand that I can :set nolist but imagine if I have many

How to make vi/vim execute “rewrite filter on write” for given file extension?

I would like to be able to write handy “short version” in configuration file. The obvious way to achieve it would be “on save filter” executed by vi/vim. The filter script would rewrite “short version” to “long version” expected by the app. Answer Assuming code is an ex command that does your filtering (which could be calling a vimscript function,

How to set ctag in vim editor one time

I have created ctags for my project. Now every time, I open file in vim editor I set ctag location. Is it possible to set the ctag location for one time in some where that I don’t know, So that when I open a file from my project in vim, it will start working, I do not need to fire

How to switch from terminal back to editor in vim?

I am new to vim, and I learn that you can interact with the terminal two ways while in vim. The first is to type: ! . The second is :term, when you have a terminal side by side with your source code. As soon as I press :term, my cursor is in the terminal. How do I switch back

Why does running C code in Vim skip scanf()?

I’m using neovim in arch linux with the gcc C compiler, this is what I use in my .vimrc to compile and run map <F5> :w <CR> :!gcc % -o %< && ./%< <CR> The issue is that my code will run fine but any scanf() functions won’t prompt an input and will be ignored as the program will runs.

Advertisement