- vim is use to modify configuration file (ex.: ini)
- sudo vim filename (...to create filename or open filename)
- sudo chown username filename (...to change the filename ownership to username denis in order for me-denis to be able to modify and save the file)
- sudo chown newfile root (the owner of newfile is now root)
- sudo chown newfile denis (the owner of newfile is now denis)
- sudo vim /etc/passwd (to open user account file)
- :q (to quit an open file with vim)
- a (in vim, type a to activate insert mode, press esc to quit insert mode)
- escape the edit mode to find something in the file (ex.: *max*)
- :/ *max* (find downward in the file anything with max in it, *=wild card)
- :/? *max* (find upward in the file anything with max in it, *=wild card)
- press n to find the next *max* word
- sudo vim (to open vim editor)
- :e filename (to open filename)
- :q (quit, no save)
- :q! (forced quit, no save)
- :wq (save-overwrite and quit)
- :wq newfilename (save as newfilename and quit)
- $clear (to clean terminal window)
dimanche 23 novembre 2014
how to create or edit or modif a configuration file with vim
http://www.youtube.com/watch?v=ImK_dHPOTIE
S'abonner à :
Publier des commentaires (Atom)
Aucun commentaire:
Publier un commentaire