Skip to content

Instantly share code, notes, and snippets.

@echristopherson
Last active June 16, 2020 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save echristopherson/37fb3f9516ece914a1e22280f801db59 to your computer and use it in GitHub Desktop.
Save echristopherson/37fb3f9516ece914a1e22280f801db59 to your computer and use it in GitHub Desktop.
Test ability to move to specific window in vimrc
silent belowright split file1.txt
silent belowright split file2.txt
3 wincmd w
@echristopherson
Copy link
Author

Expected result when running vim -u NONE -U NONE -c 'silent belowright split file1.txt' -c 'silent belowright split file2.txt' -c '3 wincmd w': Three split windows; cursor is in bottom one (#3).
Result: Three split windows; cursor is in bottom one (#3).

Expected result when running vim -u win_pos_test.vimrc: Three split windows; cursor is in bottom one (#3).
Result: Three split windows; cursor is in top on (#1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment