RE: Selecting a part of a line and then copy or cut it and then paste is somewhere.
Anyway, how can I map shift-arrow keys as is used in SELECT-MODE? Or any other suggestion for a smarter way is also very welcome. I just use visual mode. Almost the same exact motions as arrowing around, ie, hit the start where you want to begin highlighting, then move 'til the end. v characterwise highlighting V linewise highlighting Then once highlighted, you could yank to a clipboard, use as the affected text of a 's', 'x', 'r' command, etc. Eg, if I wanted to change yank to put in the above sentence, I could do /yacrvesput and be done with it. Try it. Instead of 'e' to get to the end of the word, I could do 10e, '$', use the arrows, whatever I wanted to encompass the text I wanted to affect, then use whatever operators to effect those changes. 'x' or del to delete, 's' to substitute, etc.
Selecting a part of a line and then copy or cut it and then paste is somewhere.
Hi, I'm trying to learn new vim habbits by - not sourcing mswin.vim - not setting behave mswin. to migrate easier to linux. I also start using the old-dos way again by copying, cutting and pasting with ctrl-insert, shift-delete and shift-insert iso CTRL-C, CTRL-X, CTRL-V, as these CTRL-keys are not always handeled the same on a linux distro. What I now miss is the SELECT-MODE. Not sure if this is done in mswin.vim and behave mswin. I used to select a part of a line by pressing shift and one of the arrow keys. It then showed SELECT-MODE, and what was selected you could easily cut and past or copy and paste. But currently shift-left or right moves to the next or previous word Shift-up and shift-down moves a file up or down one screen. Unclear where these mappings are done, are these default vim mappings? Anyway, how can I map shift-arrow keys as is used in SELECT-MODE? Or any other suggestion for a smarter way is also very welcome. Rgds, Eric _ With tax season right around the corner, make sure to follow these few simple tips. http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMFebtagline
Re: Selecting a part of a line and then copy or cut it and then paste is somewhere.
On Mon, 26 Feb 2007, Eric Leenman wrote: Hi, I'm trying to learn new vim habbits by - not sourcing mswin.vim - not setting behave mswin. to migrate easier to linux. [...] What I now miss is the SELECT-MODE. Not sure if this is done in mswin.vim and behave mswin. I used to select a part of a line by pressing shift and one of the arrow keys. It then showed SELECT-MODE, and what was selected you could easily cut and past or copy and paste. Sounds like you want visual mode, :he visual-use explains it well. HTH Hugh
Re: Selecting a part of a line and then copy or cut it and then paste is somewhere.
Eric Leenman wrote: Hi, I'm trying to learn new vim habbits by - not sourcing mswin.vim - not setting behave mswin. to migrate easier to linux. I also start using the old-dos way again by copying, cutting and pasting with ctrl-insert, shift-delete and shift-insert iso CTRL-C, CTRL-X, CTRL-V, as these CTRL-keys are not always handeled the same on a linux distro. What I now miss is the SELECT-MODE. Not sure if this is done in mswin.vim and behave mswin. I used to select a part of a line by pressing shift and one of the arrow keys. It then showed SELECT-MODE, and what was selected you could easily cut and past or copy and paste. But currently shift-left or right moves to the next or previous word Shift-up and shift-down moves a file up or down one screen. Unclear where these mappings are done, are these default vim mappings? Anyway, how can I map shift-arrow keys as is used in SELECT-MODE? Or any other suggestion for a smarter way is also very welcome. Rgds, Eric _ With tax season right around the corner, make sure to follow these few simple tips. http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMFebtagline You can use the v key to enter visual mode. Then the normal hjkl movements to select the text you would like. shift-v will select by entire line. ctrl-v will enter visual block mode. You can also select text components like aw - a word, iw - inner word, as - a sentence, ap - a paragraph. see :help visual.txt there is also an entry about 'Select-mode' which may be more what you want. Hope this helps. Kevin
Re: Selecting a part of a line and then copy or cut it and then paste is somewhere.
Eric Leenman wrote: Hi, I'm trying to learn new vim habbits by - not sourcing mswin.vim - not setting behave mswin. to migrate easier to linux. I also start using the old-dos way again by copying, cutting and pasting with ctrl-insert, shift-delete and shift-insert iso CTRL-C, CTRL-X, CTRL-V, as these CTRL-keys are not always handeled the same on a linux distro. What I now miss is the SELECT-MODE. Not sure if this is done in mswin.vim and behave mswin. I used to select a part of a line by pressing shift and one of the arrow keys. It then showed SELECT-MODE, and what was selected you could easily cut and past or copy and paste. But currently shift-left or right moves to the next or previous word Shift-up and shift-down moves a file up or down one screen. Unclear where these mappings are done, are these default vim mappings? Anyway, how can I map shift-arrow keys as is used in SELECT-MODE? Or any other suggestion for a smarter way is also very welcome. Rgds, Eric Standard visual mode is entered by hitting v in Normal mode (with three variations: v for characterwise, V linewise, Ctrl-V blockwise). This is usually not Select mode in the sense that hitting a printable key will not replace the selection. For instance, hjkl (and some others) move the cursor about. In Select mode, any printable key replaces the selection. Here are the possible ways to use Select mode: - by hitting Shift-arrow, if 'selectmode' contains key and 'keymodel' contains startsel. (If it also contains stopsel, an unshifted arrow cancels Select mode; if it doesn't, it extends it just like the same shifted key does.) - by dragging the mouse, if 'selectmode' contains mouse. - by right-clicking, if 'selectmode' contains mouse and 'mousemodel' contains extend (I don't use this). - by v V or Ctrl-V, if 'selectmode' contains cmd (not recommended). 'selectmode', 'keymodel' and 'mousemodel' (and also 'selection') are set implicitly by the :behave command. Personally (but YMMV) I use neither :behave mswin nor :behave xterm but the following compromise: set selection=inclusive set keymodel=startsel set mousemodel=popup set selectmode=mouse,key Best regards, Tony. -- Paul's Law: In America, it's not how much an item costs, it's how much you save.