vim is a very powerful editor, and when used with NERDTree, you can easily open files, search for files, etc. However, files cannot be created or deleted, which is somewhat inconvenient.
vim has a simple command line function and can perform touch/rm operations.
Is there a way that when NERDTreeC
goes to a certain directory, the vim terminal can also automatically cd
to the directory, so that when using the vim command line to create and delete files, it will not Need to write a long path
Thank you everyone for your answers, it made me realize that I asked such a SB
question
巴扎黑2017-05-16 16:42:48
= =
Sir, do you know that in command mode, add in front of! Can execute shell commands
For example:! mkdir www to create a new folder.
! rm to delete the file
Of course, if you use Windows, just pretend I didn’t say anything
伊谢尔伦2017-05-16 16:42:48
vim is a very powerful editor. When used with NERDTree, you can easily open files, search for files, etc. However, files cannot be created or deleted, which is somewhat inconvenient.
1. Create a new file. Isn’t it equivalent to creating a new file by adding a file name suffix in vim and saving it? Or as someone above said:!touch, but this is a command to call the operating system. Linux has it, but I don’t know about windows. Deleting files is similar
vim has a simple command line function and can perform touch/rm operations.
Is there a way that when NERDTreeC goes to a certain directory, the vim terminal can also automatically cd to the directory, so that when using the vim command line to create and delete files, there is no need to write a long path
2. Does NerdTree have this function? See the help information given above
某草草2017-05-16 16:42:48
Give you a simple cheatsheet
https://gist.github.com/ldong/f05bbae89079f52cca0e
某草草2017-05-16 16:42:48
Incorrect, m reported an error
And the NERDTree created with the command is not updated in real time
漂亮男人2017-05-16 16:42:48
https://github.com/tpope/vim-eunuch
世界只因有你2017-05-16 16:42:48
Windows users can tell you that it can also be used in gvim! Add cmd command to operate the file, but the cmd window will pop up during the command execution...
By the way, after using commands to operate files, NERDTree cannot automatically refresh the directory...
巴扎黑2017-05-16 16:42:48
Newcomers would like to add: NERDTree cannot automatically refresh the directory...you can use shift+R to refresh manually.
Also, just read the answer given on the 1st floor carefully. After the cursor points to the file, press m and four file operations will appear. At this time, you can create, delete, copy and other operations.