No, that’s what ‘x’ is supposed to do. If you want it to behave more like backspace then you might want to try ‘X’ instead (i.e. shift-x).
nix
November 2nd, 2009 at 11:52 PM
Thanks Derek.
nix
November 2nd, 2009 at 11:58 PM
Hello,
I actually tried it with and without the settings, Deleting ‘x’ at the end of the line; the cursor moves back a space.
IE: The Fuzzy Rabbit$
The Fuzzy RabbiX
The back space operation of the ‘x’ at the character before the $ moves back one space. No where else does this happen. In the middle of a line it stays in it’s current position.
But the Shift X works the way the old ‘x’ works. Test it out: cause I am on new meds. :-(
Nix
nix
November 3rd, 2009 at 12:18 AM
Did some more testing; it’s related to :set ve=”"
1) At the end of line $ deleting a character will shift the cursor to the right most column with :set ve disabled. IE: Last character is in column 13 deleting 13 would shift the cursor over to column 12.
2) In the middle of the line the cursor will stay in the same column and shift the other characters from the right side to the left side by column. With set ve = “” IE: cursor under column 5; hit ‘x’ the cursor remains in column 5 and the text to the right of it will be move to the left.
3)Using a Shift X will delete the character behind the cursor.
So using :set ve=all I have to be one column past the eol $. to get the desire effect for ‘x’ to work
PS: blame the meds. Thank you for your input.
PSS: I know this isn’t vim support; but if you have an answer; that would be awesome.
I check posts this morning and find you’ve asked and answered your own question. Nice :)
I probably wouldn’t have been able to help much though. The normal behaviour of ‘x’ has never seemed surprising. At the end of the line, the cursor moves because without virtual edit, you can’t go beyond the end of the line so the cursor must be moved. Virtual edit is an enhancement to Vim to let it do different stuff, not to correct “incorrect” behaviour. But if it works for you, then cool!
Matt
November 9th, 2009 at 11:18 PM
I don’t like shifting my hand one key over every time I change between normal and insert modes, so I did this:
map j <Left>
map k <Down>
map l <Up>
map ; <Right>
map h <Nop>
nnoremap <c-e> ;
vnoremap <c-e> ;
I also use the first five lines in my vimperator, mutt, and vifm configs.
legolas
January 9th, 2010 at 11:39 PM
Hi Derek,
I’ve one problem. I’ve enabled the source explorer plugin,NERD Tree, and TagList plugins. But when I search for any specific word by pressing +* it doesn’t get highlighted. Can you please help me to find out the settings for this thing..
Thanks in advance..
Legolas
legolas
January 9th, 2010 at 11:41 PM
Hi Derek,
For your more information. I’ve also set the hlseach in my vimrc file.
There are a few things to try, but first I just have to get this out of the way… you wrote that you do ‘+*’, which is two commands and the first one (+) will put the cursor one line downward. If you are actually doing that, and it wasn’t just a misprint, then don’t :) All you want to hit is ‘*’.
Now, for the other bits…
- Try typing ‘:set hls?’ and see what happens. If it says ‘nohlsearch’ then even though you’ve set ‘hlsearch’ in your vimrc, something else is turning it off.
- Try explicitly typing ‘:set hls’ and then hit ‘*’. Does it highlight now? Again, it’s getting turned off by something.
Give that stuff a go and see what happens. If you suspect that something else is resetting it for you, then type ‘:verbose set hls?’ and it should tell you what file was responsible for setting it last (you might have to restart Vim to get a “fresh” setting since you probably set it from the command line manually). See ‘:help set-verbose’ for more information on that one.
James Tiet
April 4th, 2010 at 4:55 AM
Thanks for your post,I learn a lot from your vimrc file
nix
April 11th, 2010 at 8:13 PM
Hope your hose move is going well.
I have learned a lot from the videos as well as the configuration files. Just thought I might pass along some things you or some of the viewers might find useful.
The pasting/putting here grabs from the clipboard; one and the same on windows not so in the *nix world (cut buffer, select buffer and clipboard). However the text doesn’t get fouled up when pasting or putting. So, this might be quite similar to your “paste mapping”. I think it has some additional nice touches (putting before or after a location; putting over a visual selection). I should play with paste more before making that statement. :help put for details.
” Paste from X11 clipboard. Vim has to be compiled with clipboard
” support. gVim shouldn’t have a problem.
map ,p “+p
map ,P “+P
” Yank from vim to X11 clipboard. Not sure how this works under
” Windows. Does a “yy” copy to windows clipboard? If it doesn’t
” This might be useful; if it works the same way or ctrl-c &
” ctrl-v in windows.
map ,y “+y
” Paste with indents. My fingers don’t like [ ] . Must be out
” of shape. Well, I am oval; just kidding.
map ,ip ]p
map ,iP ]P
” Fun with buffers.
” List buffers and select one file to open.
nnoremap ,b :ls:tab sbuffer
” If you know the buffer number:
cnoremap ,ob tab sbuffer
On a side note to all; I have buffers redirected to tabs; even from the buffer list. I kind of got hooked on tabs (omg).
“Switch buffer to tabs. :help switchbuf for details.
set switchbuf=usetab,newtab
Missing the video Derek. Hope things are going well.
nix
April 11th, 2010 at 9:10 PM
PS: I should mention that in xterm I have:
SelectToClipboard: true
This changes the way cut/select/copy/paste works in xterm and vim. Also some apps like xpdf & xterm don’t play nice when the clipboard option is set. Play with the vim settings and the xterm settings.
Should have mentioned it up front. What does “SelectToClipboard”? If you select or highlight something in xterm; it copies it a clipboard so in some GUI app you can use ctrl-v instead of middle clicking. Yes, the mouse is bad.
nix
April 11th, 2010 at 10:58 PM
PS: I have one question; if you have time:
nmap ,n :set invhls:set hls?
What is the question mark used for after the hls. I tried to set wrap and linebreak in one command. It works; but seems like I kind of riggged it. Not sure if it’s proper.
cnoremap ,wl set invwrap invlinebreak:set wrap? linebreak?
Hey dood. The question mark merely displays the value. Because this is a toggle switch, it’s nice to know what the value is after it’s been toggled.
jojomonkey
October 4th, 2010 at 8:53 PM
thanks. lost my vimrc from a while ago. brushing up on vim since have been using eclipse mainly for some time. your videos are a great refresher and some new stuff for me. your vimrc is great.
Rick Sinclair
December 7th, 2010 at 8:25 PM
Thanks for this Derek! I’m sure it will help me learn what a good vimrc file should have and look like! (;
kuddl
January 10th, 2011 at 1:40 PM
Hi Derek,
thanks for the videos.
I will definitly give vim another try. I tried it already a couple of times and always failed …
One thing:
nmap ,w :set invwrap:set wrap?
=> it’s not working. I’m on OSX 10.6.5 with the default VIM 7.2.108.
Any ideas?
tania5
January 15th, 2011 at 10:31 PM
Alright, I
blaine
August 31st, 2011 at 11:43 AM
Hi Derek. I’ve been enjoying your videos, thank you. It appears your github link is invalid so I can’t check out your .vimrc file.
Comments