Vim: Open new file with existing vim in new window - vim

Here is the first way which works perfectly. I can open new file with existing vim through cmdline with command below, that file will, as expected, be opened in a new window.
gvim --remote <filename>
However, problem comes up with the other way. When I open windows explorer, right click a file, and choose 'open with existing vim', that file will be opened in the window where I'm editing another file.
Worse still, I'm using Nerdtree at the moment; the Nerdtree window is always used to display the new file, which is definitely intolerable.

Related

Vim: Multiple tabs in one window?

I would like to know the possible way(s) to open multiple vim tabs under one window.
In Vim, we could open new windows with :Sexplore. Likewise, we can also open a file in a new tab for editing with :tabe <filename>.
Is there a way for us to have multiple tabs under a split window ?
My intention is to view the directories on one side and have the files for editing on the other side.

How to open a file into the right editor (of split view)? [duplicate]

When I switch between files (Using ctrl-n for examples) in different editors, intellij always opens the file in the original editor the tab for the file is located. Coming from a vim background this seems counter intuitive for me. Is there a way to force intellij to always open the file in the same editor window?
Please vote for the following related issues:
IDEA-67559 Opening a file when there are multiple file groups may re-open in a different group rather than opening in the current group
IDEA-81628 Navigation within same file mistakenly leaves split editor
When using Ctrl-Shift-N to open the desired file, Shift-Enter to confirm will maintain the focused tab group.

Using multiple files simultaneously with tabs in vim NERDTree

Okay, this has been asked before.
But the answers did not really cover what I was looking for. I do not even get the purpose of t shortcut, it just opens another nerdtree where I can't even open folders with enter.
What I would like to do is to open files in new tabs inside one nerdtree session, just like in any other non-terminal text editor.
Now, if I open another file with enter, it closes the previously edited file. It becomes quite tedious very fast while working on a project.
Anybody has a solution for this?

vim/gvim's Split File Explorer not working like it used to

For the life of me I can't figure this out. I occasionally use gvim's 'Split File Explorer' from main 'Window' menu.
Normally this would open a vertical directory file listing on the left side and a empty vertical window on the right side. Then I could simple select a file from the left side and it would open in the right side window.
Now, when I select 'Split File Explorer' it opens only one window, but furthermore, when I select a file, it open the file in the current window. Yes, I discovered you can use the ':E' to get back to the file explorer list. Another point: when I have a cursor on a file, then enter ':vs .', it doesn't open the cursor-selected file - instead it opens another vertical window with directory file listings.
How can I get the original functionality back where it opens two windows and when I select a file, it opens the file in the other window (while preserving the directory file listing on the left)?
I'm using vim version 7.4 . Also, I have not recently alter or changed either of my .vimrc or .gvimrc files.
And one final note: just recently up-leveled to RedHat6.7 (from 6.1). I'm not sure if this has anything to do with it.

Open files as tabs in Gedit

There is one thing about gedit that really makes me nervous :#.
If I open some file from the terminal, for exampe
gedit ~/some_file.txt &
pop up an window with the file, then if I open another one
gedit ~/some_file2.txt &
it opens the file in the same window (just in a new tab), that is great.
The problem comes when I open some 3rd file from the file manager, it opens the file in new window instead of new tab, which makes me very angry.
How to solve this >?
This is a well-known issue with gedit. It is because of the algorithm it uses to check whether to open the new file in the same instance (as a tab) or in a new one. Fortunately, a solution is available here.
BTW, the gedit I'm using ( 2.30.4) has an option under the "Documents" menu to open a tab in a new window.

Resources