Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9150993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:41:33+00:00 2026-06-17T11:41:33+00:00

This problem clearly far transcends my understanding of Vim. These two key binds only

  • 0

This problem clearly far transcends my understanding of Vim. These two key binds only differ by two characters, otherwise they are completely identical.

" Move viewport up/down.
noremap <C-d> :exe "normal! " . (winheight(".") / 4) . "\<C-e>"<CR>
noremap <C-u> :exe "normal! " . (winheight(".") / 4) . "\<C-y>"<CR>

And yet, the bottom one (<C-u>) works as perfectly as intended, while the top one causes this error:

E114: Missing quote: “\”
E15: Invalid expression: “normal! ” . (winheight(“.”) / 4) . “\”

I have restarted Vim twice and made triply sure that only these commands are bound to their keys. I also tried switching them, in case that was relevant for some reason, but the <C-d> command still crashes.

So where’s Waldo?


Output of gvim.exe --version:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 16 2010 10:31:31)
MS-Windows 64-bit GUI version with OLE support
Compiled by george@reilly.org
Huge version with GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input 
+iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak 
+lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse 
+mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole 
-osfiletype +path_extra -perl +persistent_undo +postscript +printer +profile 
+python/dyn -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs 
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl -tgetent -termresponse +textobjects +title 
+toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim 
-xterm_save -xpm_w32 
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE 
-DFEAT_NETBEANS_INTG      -DWINVER=0x0400 -D_WIN32_WINNT=0x0400  /Fo.\ObjGOY/ /Ox /GL -DNDEBUG  
/Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_MBYTE -DFEAT_GUI_W32 
-DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PYTHON -DDYNAMIC_PYTHON  
-DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DMSWINPS -DFEAT_HUGE /Fd.\ObjGOY/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib 
shell32.lib gdi32.lib  comdlg32.lib ole32.lib uuid.lib /machine:AMD64 /nodefaultlib gdi32.lib version.lib   
winspool.lib comctl32.lib advapi32.lib shell32.lib  /machine:AMD64 /nodefaultlib libcmt.lib oleaut32.lib  user32.lib

I downloaded Vim from the link on the official Vim download page:

http://code.google.com/p/vim-win3264/downloads/list

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:41:34+00:00Added an answer on June 17, 2026 at 11:41 am

    noremap interprets <C-e> and <C-y> before exe does, so exe is then fed the control sequences, which are not necessarily interpreted properly. A possible workaround is to define commands and then map to them:

    com! ShiftDown exe "norm!" winheight(".")/4 . "<C-e>"
    com! ShiftUp exe "norm!" winheight(".")/4 . "<C-y>"
    noremap <C-d> :ShiftDown<CR>
    noremap <C-u> :ShiftUp<CR>
    

    It’s also possible to directly map the commands by using <C-v> <C-e> and <C-v> <C-y> to insert those characters:

    noremap <C-d> :exe "norm!" winheight(".")/4 . "<C-v><C-e>"<CR>
    noremap <C-u> :exe "norm!" winheight(".")/4 . "<C-v><C-y>"<CR>
    

    Alternatively, <LT> can be used to insert a literal <:

    noremap <C-d> :exe "norm!" winheight(".")/4 . "<Bslash><LT>C-e>"<CR>
    noremap <C-u> :exe "norm!" winheight(".")/4 . "<Bslash><LT>C-y>"<CR>
    

    N.B. While a literal \ may work, :help map suggests using <Bslash> to be safe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a very strange problem, and I just hope that I can clearly
This problem is same as asked in here . Given a list of coins,
This problem seems very simple to me, but I've been unable to fix it,
This problem is caused by my acknowledge of English and jQuery or maybe something
This problem has been bugging me for a long time. For example, the code
This problem is about concurrent high speed inserts. I must admit it is very
This problem has bugged me so many times and i have now decided to
This problem is very strange and I'm hoping someone can help me. For the
This problem is happening for me on IE8 and Chrome which makes me think
This problem is baffling me: BEGIN; INSERT INTO sub_users(user_id, email) SELECT user_id FROM users

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.