Method of choice for dealing with this was copying sample line several times and then modifying variable fields by navigating to them with cursor keys or mouse, which feels like it takes surprisingly lot of time and effort. I found a better way, First, put the line {name:"#", price:#, leftover:#}, in the t register ("tY). # is a marker location for data fields. Any other unused symbol can be used instead. Then make the following mappings: :imap f#s :imap "tpf#s Do not forget :iunmap when you are done. You may also want to unmap Tab, but I never use it anyway.
Attributes | Values |
---|
rdfs:label
| |
rdfs:comment
| - Method of choice for dealing with this was copying sample line several times and then modifying variable fields by navigating to them with cursor keys or mouse, which feels like it takes surprisingly lot of time and effort. I found a better way, First, put the line {name:"#", price:#, leftover:#}, in the t register ("tY). # is a marker location for data fields. Any other unused symbol can be used instead. Then make the following mappings: :imap f#s :imap "tpf#s Do not forget :iunmap when you are done. You may also want to unmap Tab, but I never use it anyway.
|
Version
| |
dbkwik:vim/property/wikiPageUsesTemplate
| |
Previous
| |
Subpage
| |
Complexity
| |
Created
| |
ID
| |
NEXT
| |
abstract
| - Method of choice for dealing with this was copying sample line several times and then modifying variable fields by navigating to them with cursor keys or mouse, which feels like it takes surprisingly lot of time and effort. I found a better way, First, put the line {name:"#", price:#, leftover:#}, in the t register ("tY). # is a marker location for data fields. Any other unused symbol can be used instead. Then make the following mappings: :imap f#s :imap "tpf#s To start entry, type O and then enter. This will create the template line and put cursor on first data field in insert mode. Enter data and without leaving insert mode hit tab. This will bring cursor to the next field. When all fields are done, without leaving insert mode hit enter. This will create new template line. Continue entry. Do not forget :iunmap when you are done. You may also want to unmap Tab, but I never use it anyway.
|