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 3406550
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:38:29+00:00 2026-05-18T05:38:29+00:00

the -w and -W options of vim have theoretically the following effect: -w {scriptout}

  • 0

the -w and -W options of vim have theoretically the following effect:

-w {scriptout} All the characters that you type are recorded in the file
“scriptout”, until you exit Vim.
This is useful if you want to create
a script file to be used with “vim -s”
or “:source!”. When the “scriptout”
file already exists, new characters
are appended. See also
|complex-repeat|. {scriptout} cannot
start with a digit. {not in Vi}

-W {scriptout} Like -w, but do not append, overwrite an existing file.
{not in Vi}

But when I do this, the {scriptout} file will always begin with a hexadecimal sequence like 80 fd 60 (sometimes it is 80 fd 62).

I am using gvimportable.exe 7.3 from portableapps.com. With the -u NONE switch, it does the same.

What is this “magic number” for? Under Windows with gvim.exe I cannot replay my scriptout until I have removed those three leading bytes…

It seems that this feature, which could be very useful, is poorly documented.

Thank you for your answers.

  • 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-05-18T05:38:29+00:00Added an answer on May 18, 2026 at 5:38 am

    (This answer is probably fragmented significantly, it took me a while playing around – I wanted to find a solution too because it intrigued me – not just the bounty of 200 :P. It more or less shows my train of thought and experimentation.)

    I can now reproduce it with gvim on Linux, which is /usr/bin/vim.gnome -g; running as vim -g does just the same.


    Delving into the code: (futile in this case, but fun to do and to learn how to do)

    I’ve looked through the source code and I can now explain it somewhat (but not usefully!); it gets the outfile FILE (src/globals.h:1004) set (src/main.h:2275); this is then written to in src/getchar.h:1501, in the updatescript method which is used by gotchars (line 1215) which is used by vgetorpeek, which is used by vgetc and vpeekc… (no, I don’t know where this is going!) then these are used in a number of places.

    Anyway, I suppose the key is somewhere in src/gui.c, but I don’t know where at the moment! It’s also possible that some key sequence is being “sent” (physically or virtually, I don’t know), but seeing as the issue is the same across platforms it would seem more likely to be a Vim issue than otherwise.


    Interesting situations leading to a probable explanation:

    It’s also worth while noting that if you automatically quit, gvim -u NONE -w scriptout -c quit (:quit after loading) or gvim -u NONE -w scriptout -c quit (instant :quit, never shows GUI), the file scriptout is left empty.

    Additionally, if you open gvim and then close it using the X button, pressing no keys:

    0000000: 80fd 6280 fd63 80fd 62                   ..b..c..b
    

    If you open gvim, click away, click back and use :q:

    0000000: 80fd 6280 fd63 80fd 6280 fd2c 80fd 2e3a  ..b..c..b..,...:
    0000010: 710d                                     q.
    

    So I think it’s the window events are internally translated into something else. 80 fd 62 is the open sequence and 80 fd 63 80 fd 62 is the close sequence.

    I’ve found another way of triggering 80fd as well, which leads me to thing it’s some sort of “user has access to the window”; by default with GNOME in Ubuntu, Ctrl+Alt+S does something with the window (can’t remember what it’s called; slides it all up into the title bar, app inside loses keyboard control etc.). gvim ... (you know the arguments!), i<Ctrl+Alt+S (contracted) Ctrl+Alt+S (expanded) >Esc Z Q produces this for me:

    0000000: 80fd 6269 3c80 fd63 80fd 623e 1b5a 51    ..bi<..c..b>.ZQ
    

    Summary: so there we have what I believe is the solution; gVim catches the window messages in some form and – whether it should or shouldn’t – puts them in its scriptout. If you think it shouldn’t (or would like to know why they’re left in or if they’re even meant to be or whether you should care at all), ask on the Vim list, I think.

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

Sidebar

Related Questions

When doing developement for linux, I have a file for vim that changes the
Say somewhere in my Vim buffer that I have the following: function foo() {
Assuming I have the following options Hash as an argument to a method in
I have a file where I store snippets of vim commands. When I need
I would like to set some vim options in one file in the comments
I have a big file with thousands of lines of thousands of characters. I
What are some options for getting really fast 'Find in Files' searching in VIM?
What options do you have to communicate between the WARs in an EAR? We
What options do I have to work around disabled cookies for session management?
We all seen a bunch of these? Mostly for IDE's but also for vim

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.