Delete Key Mac Map To Backspace For Vi Editor
It depends on the situation. If the character you want to delete was the last one you typed it will be faster to simply hit backspace. Otherwise you'd have to hit escape and s to delete the character and continue in insert mode without using key chords. If your 'delete' key on the terminal you're using isn't acting as you expect it to, it is likely that it is sending the 'backspace' character instead of the 'delete' character that is expected. This is a common problem with PC's and Macs. The Apple Mac “Delete” key and the Windows “Backspace” key are located in the same (approximate) location on the keyboard; and both keys even function the same on a Windows computer compared to a Mac.
The rest of this article contains information to make sure your terminal uses the VT220 keymapping, and the applications make use of this. More information can be found at: • by Anne Baretta. • by Andries Brouwer. • (2001 e-mail to the Debian users mailing list). Keystroke to TTY mapping Determine Current Mapping You can determine the current mapping using the 'control-V trick': First press control-V, then the keystroke you like to examine. This will print the characters that are sent to the terminal. Grammarly alternative for mac. For example typing control-V + backspace prints: ^?
I believe that the bash bind expression for that is: bind ' e[3~': delete-char' If it works in the command line you could put in a shell startup script. I haven't figured out how to make it work in vim yet. I just use 'x' out of reflex.
Thanks man, set backspace=2 did the trick. You are awesome!;) Anonymous said. Thanks man, trying to learn Vim and it was only working correctly in a TTY.
Help: • •: 341 pages (extracted from full help linked below). •: 3346 glorious pages. Community: •: 1000+ person reasonably active IRC channel. •: Let me know if you want to be a contributor. •: low volume announcement list.
The shortcuts you write about cannot remap the Alt key itself, right? I understand this isn’t a tech support forum, no worries if you can’t reply, just going on 2 weeks trying to find some real solution.
Now everything works fine.
Interestingly, the key works as expected when I'm typing commands in VIM (e.g.,: ) -- it's only screwed up when I'm editing the actual text. This worked for me::set backspace=indent,eol,start I'm not sure exactly what it does but it is listed as a possible solution. I found this line in a vimrc file distributed with Ubuntu where the behavior of the mac 'delete' key (otherwise known as the 'backspace' key) works as expected without any other configuration. The behavior I was experiencing was a bell sound (no characters deleted) when pressing the mac 'delete' key (otherwise known as the 'backspace' key) in insert mode.
Parallels is a software product that allows users to run Windows 7 on their Mac computer. I must say, it works pretty darn well. The only real annoyance I have encountered thus far is how Parallels maps the “Delete” key. This makes the Delete and Backspace keys confusing.
So that means you can be in insert mode and go db and you'l still be in insert mode when the jobs done. Personally Id say - drop into normal mode and do a quick db, it gets less tedious as you get used to it (if thats what bothers you).
In bash Backspace is operating normally without me making any special changes. In PuTTY Backspace is set to ^? EDIT: I tested vim with the ctrl-h backspace setting and vim started working properly. However I would prefer to leave that PuTTY setting alone unless someone can convince me switching to ctrl-h is what I should do, I don't know much about why there are different key codes for backspace and maybe I'd be less hesitant to switch the default PuTTY setting if I knew more. After reading through comments I came to the conclusion that this isn't an issue with vim that I can fix with.vimrc The server is expecting Backspace to be ctrl-h while PuTTY is set to ctrl-?
So what's the default setting? I noticed this using GVIM in windows. The backspace seems to work as expected while using VIM from the terminal in most Linux systems however. The reason for this is because many Linux distro's ship with pre-made vimrc files which set some common options. For example on my Arch Linux system I have /usr/share/vim/vimfiles/archlinux.vim with: set nocompatible set backspace=indent,eol,start '. And a few more.
Put stty erase ^?
Best web host for mac. If you're just looking for hosting so you can roll your own rather than something specific for professional photographers, I can recommend. I'm with them and I also have a portfolio site through, which I also highly recommend. I'm in the process of having my PhotoShelter site integrated into liveBooks so that the archive, print sales, and licensing are combined with my main liveBooks portfolio site.
Run toe to get a (long) list of all available terminal types: toe # on BSD-like systems toe -a # on Linux-like systems For example, this term is wrong:% infocmp -1 xterm grep kbs kbs=^H While this xterm-color (on another machine) is correct:% infocmp -1 xterm-color grep kbs kbs= 177, If you found to correct one, set $TERM=xterm-color to pick the correct xterm. If you can't locate a good option on your machine, copy it (from another machine) to ~/.terminfo/x/ and set $TERM to whatever file yu copied (thus export TERM=xterm-color if you copied ~/.terminfo/x/xterm-color) If you want to create your own custom terminfo file, know that the terminfo files are compiled. You can extract them using infocmp and compile them with tic. TTY to Application mapping Zsh Add the following lines to your.zshrc file: bindkey '^?'
So you better configure this mapping before you dive into the keysyms to TTY character mapping. Screen If a shell works correctly, but if screen is started, the keys are reversed, then the best solution is to turn off screen mappings. This can be done by setting the environmental variable TERM: TERM=screen In order to always set this, define the alias: alias screen='TERM=screen screen' Apple Terminal application The default behaviour of the Apple's Terminal application is good. In the Preference dialog, Setting item: • In the Keyboard tab, make sure that 'forward delete' maps to ' 033[3~' • In the Advanced tab, make sure the 'Delete sends Ctrl-H' checkbox is off iTerm (Mac OS X application) iTerm is an alternative to Apple's Terminal. By default it comes with two Keyboard profiles, Global and xterm. Both profiles use the correct (VT220) mapping by default. Unfortunately, the key names are ill-defined.
In my.vimrc I also have: syntax enable set number set autoindent set tabstop=4 which enables syntax highlighting, shows line numbers, autoindents your code and sets the tab length to 4 characters. There are tons of other options, have a look on the vim website. There is also an integrated tutorial in vim, it takes about 30 mins and is well worth it to introduce you to some of vim's less than intuitive features. It's a great editor once you get the hang of it. After hours of frustration, that worked!!! You're a genius, thanks man!!!
You can find the Preference menu option by holding the “option/alt” button and clicking the red Parallels icon ‘ ‘ at the top of your Mac desktop. 2) Press the “+” button at the bottom of the shortcuts list to add a new ‘shortcut’. 3) In the “From” key section, press the Mac “Delete” key. The word Delete will appear. 4) In the “To” key section, select the “Backspace” key in the drop down box. Now your “Delete” key will perform like a Windows Backspace key, deleting the characters to the left.
Depending on which of these you normally see when you hit your backspace key. That will give you backspace capabilities in everything but emacs. In emacs, add the following lines to your.emacs file (create one if you don't have one, as above): (setq term-setup-hook '(lambda () (setq keyboard-translate-table ' C-@ C-a C-b C-c C-d C-e C-f C-g C-?' ) (global-set-key ' M-h' 'help-for-help))) That will fix the backspace key, and set 'M-h' to give you help (regularly c-h does that).
So what do these values mean exactly? Indent Vim adds automatic indentation for many filetypes; by default, you're not allowed to backspace over this; the rules of what is considered to be 'autoindentation' are somewhat subtle, for example, if we would type this (where █ is the cursor): if:; then █ Backspacing won't work. But if we would then add a command and the fi, and go back up, we are allowed to remove the indentation: if:; then █: fi This is because in the first example, Vim determined it should add 1 level of indentation when you pressed Enter; but in the second example, Vim didn't autoindent anything, it's just Tab characters or a few spaces. Also see eol This should be the most obvious, pressing Backspace also removes EOL markers ( n or r n); if disabled, Backspace will do nothing if you try to delete a EOL marker. Start This means you can only delete text that you've inserted since insert mode started, and you can't delete any text that was previously inserted.
Whenever I press the backspace in the insert mode it just moves one place to the left instead of erasing the character. How can I get back the default backspace functionality? Please note that I don't want to install vim or set nocompatibilty.
I am new to vi, actually I have started learning vi from today and I have got stuck at the behavior of the backspace key. Actually when I fired up vi on my Ubuntu 12.04 for the first time my backspace key was working normally but after that it has started behaving strangely. Whenever I press the backspace in the insert mode it just moves one place to the left instead of erasing the character. How can I get back the default backspace functionality? Please note that I don't want to install vim or set nocompatibilty. That's correct behavior for vi, and it does erase the character, it just doesn't show it by replacing it with a blank like in vim.