Este é um blog onde anoto dicas técnicas de informática e computação.
This is a blog where I write down technical tips on computing.
Be aware that some resources used in this blog may use cookies to collect information used by Ads and Google Analytics. I do not monetize from this website, neither require or use personal information.
Friday, March 11, 2016
Insert hostname or pwd or current file name in VI
You can use the read file command
:r!hostname
you can use the visual mode
v!hostname
or
!!hostname
!!pwd
in insertmode
Ctrl+R %
or
!!echo %:p:h
:p is fullpath
:p:h is the head of the fullpath
No comments:
Post a Comment