1

I'm currently running raspbian (a 7 version, cat /etc/debian_version says 7.8) on a Raspberry Pi 2 Model B.

Because I have to edit some of my python files directly on the running system, I copied my .vimrc file in order to get the vim environment I'm used to work with.

The first thing I noticed is that my self defined keys are not working:

map <C-Right> :tabnext<CR>
map <C-Left> :tabprevious<CR>
map <C-n> :tabnew<SPACE>
map <F9> :set number!<CR>
imap <F9> <ESC>:set number!<CR>a
set pastetoggle=<F10>

None of these key combinations work, neither Ctrl+n nor F9, etc.

I found this question Mapping Ctrl+s does not work and I decided to check whether the stty settings were the same or not.

# on my local debian 7 machine
$ stty 
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?; swtch = M-^?;
iutf8

# on raspbian
$ stty
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?;
-brkint

they are clearly different, so I tried syncing the settings

 # on my local debian 7 machine
 $ stty --save
 6506:5:4bf:8a3....

 # on raspbian
 $ stty 6506:5:4bf:8a3....

that didn't help either, adding silent !stty -ixon to my .vimrc also didn't help.

None of my keymaps seem to be working, I don't understand why.

I also had a strange error with this code:

 autocmd BufReadPost *
       \ if ! exists("g:leave_my_cursor_position_alone") |
       \     if line("'\"") > 0 && line ("'\"") <= line("$") |
       \         exe "normal g'\"" |
       \     endif |
       \ endif

I've had these lines in my .vimrc for ages and now I'm getting this:

Error detected while processing /home/teststand/.vimrc-yanez:
line   95: 
E10: \ should be followed by /, ? or &
line   96: 
E10: \ should be followed by /, ? or &
line   97: 
E10: \ should be followed by /, ? or &
line   98: 
E10: \ should be followed by /, ? or &
line   99: 
E10: \ should be followed by /, ? or &
Press ENTER or type command to continue

I don't know how to solve these problems. Is the vim build buggy or do I have to change something else in my stty settings?

migrated from raspberrypi.stackexchange.com Dec 1 '15 at 14:12

This question came from our site for users and developers of hardware and software for Raspberry Pi.

  • 2
    This looks like, your vim starts in compatible mode. so try putting a :set nocompatible into your .vimrc. – Christian Brabandt Dec 1 '15 at 16:26
  • Already tried that (forgot to write that) because I thought this might be it. Sadly it didn't help either. – Pablo Dec 1 '15 at 17:33
  • perhaps you have a tiny vim installed? What is the output of :version – Christian Brabandt Dec 1 '15 at 19:09
  • vim --version says: VIM - Vi IMproved 7.3 Included patches: 1-547. The vim-tiny package was installed though, but the main big package was installed as well. I uninstalled vim-tiny but that didn't help either. – Pablo Dec 2 '15 at 9:19
  • check the version output, which flavor (tiny, big, huge) is running when you start vim – Christian Brabandt Dec 2 '15 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.