• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 124
  • Last Modified:

vi mode copy paste

Hi,
how to do vi mode copy paste
what is mt what it means by tick which key i have to press for tick
mt
y tick t

what is keeping in buffer

mt
d tick t

what is d tick t

seems cygwyn not suporting vi.

how to practice vi on any free downloaded software or online.

what is p for paste and u undo commands?

what is map [ j 0.
 map [ j $.
please advise
0
gudii9
Asked:
gudii9
3 Solutions
 
slightwv (䄆 Netminder) Commented:
>>what is keeping in buffer

It is like the clipboard in Windows.   It is just an in-memory storage area to store text.

>>how to do vi mode copy paste

There are MANY ways to copy things into the buffer.

>>what is mt what it means by tick which key i have to press for tick

I don't understand "tick".  Where did you come across that term?

>>what is p for paste and u undo commands?

Just that.  p pastes waht is in the buffer and u undoes the previous command.

>>seems cygwyn not suporting vi.

Depends on what you install.  I have vi and vim in my cygwin install.

>>how to practice vi on any free downloaded software or online.

I really like GVim on Windows:
http://www.vim.org/download.php#pc

It was my work desktop editor in my previous job and it is still my editor on my home PC.

Note that vi and vim are different and not everything you can do in vim works in straight vi.
0
 
nociSoftware EngineerCommented:
ok tick (')  is setting a mark on a line
t = copy
m = move...

maybe command mode is easier to use/see....
command mode starts with :
goto starting line  and type :ka              (3 characters, colon k a ) set label a to current line
goto ending line and type :kb                (3 characters, colon k b) set label b to current line
then goto the line where you want to copy the lines after:

and type     :'a,'bt.         (8 characters,   colon tick a comma tick b t dot )   lines from label a to label b copy after current.

dot = current line
colon = command mode
slash = start search mode down
question = start search mode up
tick = use mark.

command mode description is also described with ex editor.
one can do wildly creative edits...

10,/who/g/where/s/what/why/g

from line 10, unto a line containing 'who', find all lines containing 'where' and replace all 'what' occurences by 'why'...
g= global search and mark matching lines for command processing, command after search pattern.
s = substitute
g at the and is do all patterns one can find on a line, otherwise only the first match is chosen.

any search string can be a regular expression, so the . (match any character), [a-z]  (match lowercase, [0123456789] = match digit [0-9] = match digit.  
(* match patern 0 or more times, + 1 or more times    ^ start of string, $ end of string.)
0
 
dfkeCommented:
Hi,

if you simply want to copy a line in vi you move the cursor on the line you want to copy.
And then press: ESC y y p

Cheers
0
 
nociSoftware EngineerCommented:
wrt. cygwin, did you check for vim (vi Improved...), equivalent to vim, but more consistent and a lot better in handling
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
>> how to practice vi on any free downloaded software or online.
http://www.openvim.com
https://www.tutorialspoint.com/unix_terminal_online.php
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now