New answers tagged

4

From command line: open specified files as horizontal splits gvim -o report.log power.log area.log open specified files as vertical splits gvim -O report.log power.log area.log Within the editor open file for editing in new horizontal split screen :split filename :sp filename open file for editing in new vertical split screen :vsplit filename :vs ...


3

Ctrl+W, S (upper case) for horizontal splitting


0

In this case , root has permission to write to the directory, so root's editor writes a file /path/file.tmp (or some similar name) then moves the new file to /path/file. Since root just created the file, it is owned by root. This is how some of the editors work by default. For more help about editors and preserving file permissions etc , see the link below: ...


0

The editor is vi, its very simple to play around, if you need to type anything press escape button and then i (i means insert) if you need to save it then again press escape button and then :wq If you don not want to save and close press escape and then :q!


3

crontab -e enters into default editor (vi editor). The simple shortcuts in vi editor are i - Insert mode (allows you to write data) : mode :w -> we can save data :q -> quit from editor :q! -> force quit :wq -> save and quit any time we can reset the mode of editor by using Esc key. You can use EDITOR=nano crontab -e to edit crontab file by using the ...


12

You can pick any editor you like by setting the $EDITOR variable before calling crontab -e e.g. $ EDITOR=emacs crontab -e will run emacs as your editor. If you have a favourite editor then you can select that. Many programs that call an external editor may also use this $EDITOR variable so you may find it useful to set it permanently in your .profile ...


5

That looks like vi or one of its many clones, probably vim. You can use i to insert, x to delete the current character, dd to delete a line (and copy it to clipboard), p to paste below the current line, and u to undo the last change. Hopefully that will be enough to let you do your change. For more details, search for a vi manual, handbook, or ...


0

I've had the following in my ~/.vimrc for years: autocmd BufNewFile,BufRead /tmp/mutt* set noautoindent filetype=mail wm=0 tw=78 nonumber digraph nolist autocmd BufNewFile,BufRead ~/tmp/mutt* set noautoindent filetype=mail wm=0 tw=78 nonumber digraph nolist They tell vim to set those options when editing matching files. It works well for me. The only ...


1

You can use a shell script to hold the options, and set your editor variable to that. For example #!/bin/sh vim -c "set fo+=aw" "$@" The Mutt FAQ suggests a similar approach in How to trim quoted replies (like stripping signatures)?, though this is not generally material for an FAQ.



Top 50 recent answers are included