How to run vi on docker container?
login into container with the following command: docker exec -it <container> bash Then , run the following command . apt-get update apt-get install vim
login into container with the following command: docker exec -it <container> bash Then , run the following command . apt-get update apt-get install vim
I think the practice of keeping code to 80 (or 79) columns was originally created to support people editing code on 80-column dumb terminals or on 80-column printouts. Those requirement have mostly gone away now, but there are still valid reasons to keep the 80 column rule: To avoid wrapping when copying code into email, … Read more
Make a selection with ALT pressed – selects a square of text instead of whole lines.
Do yourself a favor by dropping the Windows compatibility layer. The normal shortcut for entering Visual-Block mode is <C-v>. Others have dealt with recording macros, here are a few other ideas: Using only visual-block mode. Put the cursor on the second word: asd |a|sd asd asd asd; asd asd asd asd asd; asd asd asd … Read more
Since Idea IntelliJ IDEA 13.1 there is a possibility to edit multiple lines. Windows Alt + Shift + Mouse click macOS Option + Shift + Mouse click for selection. More about this new improvement in the IntelliJ blog post here. Very useful feature.
I’d strongly recommend to keep working with swap files (in case Vim crashes). You can set the directory where the swap files are stored, so they don’t clutter your normal directories: set swapfile set dir=~/tmp See also :help swap-file
To open a file or directory use the command: code /path/to/file/or/directory/you/want/to/open For macOS users, it needs to be installed manually: Launch VS Code. Command + Shift + P to open the Command Palette. Type shell command, to find the Shell Command: Install ‘code’ command in PATH and select to install it. Restart your terminal.
First of all, you may want to pick up Vim; it has a vastly superior feature set along with everything vi has. That said, it takes discipline to learn. If you have a job and can’t afford the productivity hit (without getting fired), I’d suggest taking on a weekend project for the sole purpose of … Read more
git config –global core.editor “‘C:/Program Files/Notepad++/notepad++.exe’ -multiInst -notabbar -nosession -noPlugin” Or, for 64-bit Windows and a 32-bit install of Notepad++: git config –global core.editor “‘C:/Program Files (x86)/Notepad++/notepad++.exe’ -multiInst -notabbar -nosession -noPlugin” Or, the following can be issued on the command line on either 32-bit or 64-bit Windows. It will pull the location of notepad++.exe from … Read more
To disagree with the official answer: :set list will not show ^M characters (CRs). Supplying the -b option to vi/Vim will work. Or, once Vim is loaded, type :e ++ff=unix.