How to use terminal when coding in vim?

I have several php files open in Vim , at the same time I want a list of files from a specific folder in the same server in the terminal. How should I do it?

For instance:

In terminal, I'm in devserver: ~ $

Using Vim , I opened several files to continue working.

Now, to perform other operations on the same server (for example, I would like a list of files from styles / ), how to use the terminal window / tab?

What am I doing :

In one tab, open files using Vim and On another tab, other operations are performed on the same server(e.g. listing / deleting , etc.).

In this case, I have to make an ssh login for each tab. Is there a way that I can encode using Vim and perform other operations on the same server in the terminal ?

To do this, advise the best practices .

+4
source share
6 answers

I use Ctrl-zto pause vimand fgto return it.


3+ , tmux.

+9

!<command>

:

:!ls

.

+7

tmux ( screen). ssh. - ( , , . , ssh , vim , ), vim :

:!ls styles
+3

:!bash vim,

+3

"shell"

:shell

Or you can also manage files in Vim using plugins like NERDTree. https://github.com/scrooloose/nerdtree

+1
source

Some alternatives to using <c-z>and are :!ls:

  • <c-x><c-f> insert completes file names
  • :sp stylesopen the directory with netrw. Netrw is a Vim file explorer
  • Better yet, forget about the split :e styles, then <c-6>to come back. Use :Rexto restore explorer

For more help see:

:h ctrl-z
:h :!
:h i_ctrl-x_ctrl-f
:h :Explore
:h :Rex
0
source

Source: https://habr.com/ru/post/1547734/


All Articles