Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
Change default editor of crontab in linux from nano to vim:

export EDITOR=vim

You can put this code inside of ~/.bashrc.

NOTE: export is used to set an environment variable in linux.

#linux #crontab #editor #vim #nano
When I paste something in vim all lines get indentation:

line
line
line

To solve this issue just go to command mode by pressing ESC on your keyboard now type:

:set paste

Then paste your code. Note that the text in the tooltip now says -- INSERT (paste) --.


NOTE: After you pasted your code, turn off the paste-mode, so that auto-indenting when you type works correctly again.

:set nopaste


You can set a keyboard shortcut for it (here F5):

set pastetoggle=<F5>


#editor #vim #nopaste #paste #pastetoggle