Use these keys to move and search through the text file.
Move forward one line: Down Arrow, Enter, e, or j
Move backward one line: Up Arrow, y, or k
Move forward one page: Space bar or Page Down
Move backward one page: Page Up or b
Scroll to the right: Right Arrow
Scroll to the left: Left Arrow
Jump to the top of the file: Home or g
Jump to the end of the file: End or G
Jump to a specific line: Type the line number and then hit “g”
Jump to a percentage way through the file: Type the percentage and then hit “p” or “%.” (You can even enter decimal values, so to jump to the point 27.2 percent through the file, type “27.2” and then hit “p” or “%.” Why would you want to use decimals? I honestly have no idea.)
Search forward: Hit “/” and type your search, like “/Jekyll”, and press Enter
Search backward: Hit “?” and type your search, like “/Hyde”, and press Enter
After adb devices, make sure the phone shows up twice, once for the USB connection and once for the WiFi connection, which will list your IP address. If the connections are not showing, then adb is not connecting – your phone may be blocking it. If you have the WiFi connection showing, unplug the phone from the USB and enter the following:
Everybody knows how to use the keyboard combinations Ctrl-c, Ctrl-x, and Ctrl-v in Windows and Linux (or Cmd-c, Cmd-x and Cmd-v in macOS) to copy, cut and paste text across applications.
Many think that those combinations are universal and work with any application.
But Vim and gVim are different, they use another system to exchange information with the rest of the IT world.
For example, in Vim under Linux, the key combination Ctrl-v corresponds to the visual block function and does not affect the pasting text.
I wrote this article to remind me, as a non-programmer, the key combinations to be used in the Vim world to share text with other applications.
2 Vim and the clipboard
Vim uses an original resource to exchange text with other applications.
If you press the Vim (or gVim) :reg command, you can notice a list of items beginning with a double quotation mark (“) and followed by a symbol, a letter or a number: these are the registers.
Vim uses a specific register to interact with the system clipboard and, consequently, with other applications.
This specific clipboard register is identified with the mathematical plus symbol (+) 1
3 From Vim to the Clipboard
If you need to transfer information from Vim to other environments you must use the key combination "+y to copy the text and "+x to cut it from the original document.
Pay attention to the following table:
The registers symbol
The clipboard register symbol
The letter to cut the text
The letter to copy the text
Then you have to press three keys in sequence:
x or y
In both cases, the cut or copied text is sent also to the clipboard and can be pasted outside Vim using the usual Ctrl-v command, in Windows and Linux, or Cmd-v in macOS.
4 From the Clipboard to Vim
The reverse operation is also quite simple. You can transfer your text copied from the clipboard using the string "+gP.
Let’s analyze every single component of the string:
“P” means paste before the current position.
The “g” key puts the cursor after the pasted text.
Then “gP” command produces the following result: Paste before the current position, placing the cursor after the pasted text.
If you don’t use g the cursor will be placed on the last letter of the pasted text and you’ll waste time to advance the cursor by one character.
In Vim philosophy everything must be optimized, also the single movements of the cursor!
5 Some key shortcuts in gVim
In some cases, it is also possible to use key shortcuts in gVim.
They mainly work in MS Windows but some of the work also in several Linux distributions. I can directly confirm the working in Mint, Fedora, Ubuntu, Antergos for the pasting shortcut (see list below) but not the same for the others.
There’s also another symbol for the clipboard: the asterisk (*): it produces almost the same results of the plus symbol but in GNU/Linux OS it saves information specifically for the middle mouse button.
WordPress does not come with a default widget or block to display current date or time.
However, you can still display current date or time using some very simple code.
You can add this simple code in your WordPress theme’s template files where you want to display the time.
<?php echodate(get_option('date_format')); ?>
This code simply prints the current date using the date format set in your WordPress settings. You can change the date format by visiting the Settings » General page.
You can also use your own formatting tags to output the date in any other format. For instance, using the following code you can print the date in month, day, and year format.
<?php echodate('F j, Y'); ?>
This method allows you to directly add the code into WordPress theme files, but it is not very flexible. What if you wanted to display current date and time inside a WordPress post, page, or a sidebar widget?
This next method allows you to add date and time anywhere on your site.