Vim Tab switching weird behaviour [closed] - vim

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm very new to vim and might be asking a very dumb question, but I've added a keyboard shortcut to switch between tabs, but when I do switch this happens
Instead of the tab indicator moving it moves everything, I don't know how to explain this with words but I think you get my point with the gif. Is there any way of changing this to a normal tab switching like browsers do?
The shortcuts I'm using are:
:noremap <C-n> :bnext<CR>
:noremap <C-n> :bprevious<CR>

Just fixed it by changing from bnext and bprevious to tabn and tabp....

Related

How to turn off Auto highlight text in Vim editor? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 months ago.
Improve this question
In VIM text editor, everytime whenever I type ''typedef '', it gets highlighted automatically. How to fix this?
I want to turn off word highlighting property in vim.
Looks like you have the "highlight search" flag on and the last search was for typedef. You can turn the flag off with :set nohls.
You can inspect all settings with :set all.
You can read the help for highlight search with :help hls.

How do i fast press enter in vim editor [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
It is a naive question. Because the enterkey in my keyboard is too far, so it's unconvience to press it.
Is there a key that is similar with enter in vim, so i could press it alternative enter.
Thank you very much.
I personally use a remap key that is below:
for enter -> inoremap kk <enter>
for escape -> inoreamp jj <esc>

How to enable vim-latex-suite plugin in markdown? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
In vim, the latex-suite plugin is for tex filetype. I want to apply the convenience of vim latex-suite plugin for markdown filetype. How can I do it?
EDIT: I want to use markdown syntax to take notes. But It's not convenient for me to type formula in the markdown file. It will be very convenient If the latex-suite macros/shortcuts can be used in markdown file(with the markdown highlight syntax).
In vim I set this
:set ft=tex
:set syntax=markdown
and then I have all the latex-suite macros and shortcuts working, while the syntax highlighting is set to markdown.

How to save registers in VIM [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am new to VIM and I use the command
qa
to start recording the operations in register a and the following command
q
to stop saving. And the following command to use the operations in a:
#a
But the problem is that, when I close the VIM, all these registers are deleted. Is there any way to save these operations and use it later in other sessions of VIM?
If you don't run Vim in compatible mode (only masochists would run Vim in compatible mode), named registers, "a to "z, are remembered across sessions.
Do you run Vim without a ~/.vimrc? What is the output of :set viminfo? :set compatible? (with the question mark)?
You could create a map in your .vimrc
map <F2> [your macro]
If the macro is already at register 'a', you can also use it, that is, instead of repeating [your macro], you can type <C-r>a while in insert mode.
You could also try marvim.

Where vim searches for its filename completion ctrl-x ctrl-f? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a bunch of files in (project)/src and (project)/inc.
When I press <C-x><C-f> vim should give me suggestions about filenames from there but I couldn't find how to set the directories it searches in.
The documentation I read says only that <C-p> and <C-n> moves inside the list but nothing about calibrating the search path.
set autochdir
automatically sets the "current directory" to the one containing the current file. Put it in your vimrc, enjoy life.
Its the pwd or the path from where the vim was launched.Its not configurable.
Although a new feature called path-support will be available in vim soon:
http://vimdoc.sourceforge.net/htmldoc/options.html#%27path%27
That might help you configure more.
In the meantime try these vim plugins:
FuzzyFinder
http://www.vim.org/scripts/script.php?script%5Fid=1984
zvim
https://bitbucket.org/ZyX_I/zvim
t-command
http://www.vim.org/scripts/script.php?script_id=3025
Or you can write your own vim plugin.
Refer:
http://vim.wikia.com/wiki/Searching_for_files_in_a_directory_listing
And
http://vim.wikia.com/wiki/Source_vimrc_and_use_tags_in_a_parent_directory
This is what I've done to solve the problem, seems much more easier than #askmish solution.
Edit vimrc and add this mapping :
map <F4> :cd %:h<CR>
from now on, press F4 to switch to current directory.
Now when you press <C-X><C-F> you can see a list of all files in your current working directory.

Resources