win-vind provides a lightweight hybrid UI system of CUI and GUI for Windows

Overview

win-vind

Vim Key Binder for Windows

Coverity Scan Build Status

Description

win-vind provides a lightweight hybrid UI system of CUI and GUI for Windows. And everything is inspired by Vim and its plugins. Simply put, it is a Vim-oriented toy box consisting of various useful features.

Features

  • Fast binding system
  • Vim-like mode management
  • GUI operation without mouse
  • Vim emulation everywhere
  • Process control like :!vim ~/.vimrc on resident command line
  • .vimrc style configuration
  • Low-level key mapping (e.g. Capslock -> Ctrl)
  • Running in user permission
  • Oneshot use for Vim or AHK (e.g. $ win-vind -f easy_click_left)
  • Tiling window manager
  • Hinting feature like Vimium or EasyMotion for GUI.

Demo


Download

Chocolatey Version

win-vind supports installation using Chocolatey. To install win-vind with Chocolatey, run the following command from the command line or from PowerShell.

$ choco install win-vind

winget Version

winget is also supported. To install the package, run the following command from your command line.

$ winget install win-vind

Installer Version

Portable Version

Usage

You can refer to the installation and quick tutorial in Usage - win-vind.

.vindrc samples

You can configure it in .vimrc style. What you can do in .vindrc is switch options, set parameters, remap low-level keys, and define function bindings.

" Define bindings in GUI Normal mode gnnoremap select_left_window gnnoremap select_right_window gnnoremap select_upper_window gnnoremap select_lower_window " Define bindings in insert mode imap inoremap to_edi_normal imap inoremap easy_click_left imap inoremap window_resizer ">
" ------------ Example ------------
" Virtual command line options
set shell = cmd
set cmd_fontsize = 14
set cmd_roughpos = LowerLeft
set cmd_maxchar = 100

" Enable block style caret
set blockstylecaret
set blockstylecaret_mode = solid

" Low-level key mapping in resident mode
rmap 
                  
                 

" Define bindings in GUI Normal mode
gnnoremap 
                  select_left_window
gnnoremap 
                  select_right_window
gnnoremap 
                  select_upper_window
gnnoremap 
                  select_lower_window

" Define bindings in insert mode
imap 
                  
                 
inoremap 
                  to_edi_normal

imap 
                  
                 
inoremap 
                  easy_click_left

imap 
                  
                 
inoremap 
                  window_resizer

The Functions page lists all supported functions, the Options document lists parameters and useful extensions, and the Keyword List contains keyword notations for writing .vindrc. If you want to know the default bindings, refer to Default Mappings.

Known Issues

  • EasyClick does not seem to work properly for some applications on older Windows 10 before 1803. The cause is not known, but we have confirmed that it works after 1909. (#11)
  • Windows 10/11 Single Language does not seem to be able to map toggle keys such as . (#40)

Contribute

If you would like to contribute to win-vind, see CONTRIBUTING.md.

Related Pages

Similar Projects

License

This software is provided by MIT License.

Author

  • pit-ray
Comments
  • Transitioning from insert mode to editor normal mode without losing cursor focus? [Question]

    Transitioning from insert mode to editor normal mode without losing cursor focus? [Question]

    Question

    Currently, switching from insert mode to editor normal mode causes the text field to lose focus, requiring clicking on the field to activate the text cursor again which is inconvenient. Is it possible to make the switch without the editor losing focus?

    Thanks

    bug enhancement question 
    opened by Positron010 18
  • [Question] replace ESC from edii to ediv?

    [Question] replace ESC from edii to ediv?

    Hi

    Is it possible to change the command from Esc to something else like ? The reason is that this way I could work with edii ediin with many windows, without needing to switch to guii. The only thing preventing me from doing this right now is that the Esc key is needed in many applications, but every time i click it it switches back to edin, which I don't want to.

    Thanks! Gil

    question 
    opened by gilbh 15
  • Change caret size to reflect different modes[Feature]

    Change caret size to reflect different modes[Feature]

    Describe the feature you'd like Sometimes it is helpful to know which mode one is in. For example, it would be great if the caret (insertion point) changes to block style like in the terminal to reflect that you entered normal mode just like in Vim, and then returns to the normal thin mode in insert mode. It would be helpful also to have a key binding to trigger the status indicator to reveal the current mode (just like the one that appears when switching modes). This is helpful especially for the GUI Modes.

    Thanks and appreciate your work.

    Related projects (Optional) A similar project that implements Vim using AutoHotKey (vim_ahk), has the caret width feature as an option.

    enhancement 
    opened by Positron010 10
  • WinVind stops when right-clicked in tray [Bug]

    WinVind stops when right-clicked in tray [Bug]

    Describe the bug Recently, whenever I right click the win-vind icon in the tray, the app closes. This wasn't the behavior before, where a menu appears with options like showing the configuration file location. This issue is only with win-vind, all other icons show their menus.

    Environment (please complete the following information):

    • Windows 10 Edition: Home
    • OS Type: 64bit
    • OS Version: 10.0.19042
    • OS Build: Build 19042
    • win-vind Version: 4.0.1
    • win-vind Type: installer
    • Is it reproducible?: Not sure

    What I tried:

    • Uninstalling/installing
    • Removing my .vindrc file
    • Restarting the computer

    Thanks

    bug help wanted 
    opened by Positron010 10
  • difference between EDI INSERT and GUI INSERT?

    difference between EDI INSERT and GUI INSERT?

    Hi

    I am asking this because it is much easier for me to remain in EDI INSERT while writing in Word and switch to other apps etc., than to need to switch to GUI INSERT every time I am doing something outside Word.

    Thanks Gil

    question 
    opened by gilbh 9
  • Integrate noremap and map

    Integrate noremap and map

    As discussed in #104, #96, we should implement the easy-to-write macro syntax. The current map and noremap have different features. The map is designed to propagate defined macros to other applications except for win-vind, whereas the noremap effects in win-vind scope only.

    However, the map and noremap in the original Vim are used for different purposes with win-vind. It is a factor to misunderstand for Vim users. At this time, this patch allows us to write the following style macros.

    noremap j <easy_click_left>
    
    " a -> move_cursor_down
    noremap a j
    
    " a -> easy_click_left
    map a j
    
    " only inside {} is actually entered.
    noremap a j{This text is inserted}
    

    However, this patch changes the core design and effects .vindrc syntax.

    opened by pit-ray 7
  • [Question] way to make the cmd label disappear?

    [Question] way to make the cmd label disappear?

    Hi,

    I have the following in my .vind-rc:

    set cmd_fadeout=3600
    

    -- which works very well for me, as it always shows me the current mode. However, there are specific situations when this label hide an important detail (even though I am using a small fontsize). It would be nice if there was a way to hide/make visible the current cmd, and then I could map that to a specific key, so it would be easy to toggle the visibility of the labels.

    thanks for your consideration!

    inactive-issue 
    opened by gilbh 7
  • [Bug] The character '-' is invalid ascii key code in default_config/.vindrc

    [Bug] The character '-' is invalid ascii key code in default_config/.vindrc

    The 4.3.1 release is using a default config file in default_config/.vindrc and there's an error when launching the portable 64 bits release. The log says :

    [Message] E: Invalid Syntax (L:277)

    [Error] An runtime exception occurred from class std::vector<class vind::core::KeyCode,class std::allocator > __cdecl vind::core::parse_pure_one_character_command(char). The character '-' is invalid ascii key code. (...\win-vind-4.3.1\default_config.vindrc, L:277) (enum vind::SystemCall __cdecl vind::bind::SyscmdSource::sprocess(const class std::filesystem::path &,bool))

    The 4.2.1 has not this problem (default_config/.vindrc is inexistant in my config)

    Please note that I was just launching win-vnid for a 1st use and my .vindrc (my own) is empty for the moment.

    Environment (please complete the following information):

    • Windows 10 Enterprise
    • OS Type: 64bit
    • OS Version: 21H1
    • OS Build: 10.0.19043
    • win-vind Version: 4.3.1
    • win-vind Type: zip
    • Is it reproducible?: Yes
    bug 
    opened by tudstlennkozh 7
  • [Question] Can you diffrentiate between key press and key up?

    [Question] Can you diffrentiate between key press and key up?

    Hi,

    I don't think this exists in vim, but can you distinguish between key press and key up in the key bindings that can be mapped in .vinrc?

    If yes, then I would change my binding from:

    inoremap <esc> to_edi_normal
    

    to:

    inoremap <esc[KEYUP]> to_edi_normal
    

    -- that would go a long way toward ease of use of win-vind, because it will avoid incorrect actions and overlapping mappings, such as switching to other modes, like <esc-up> and so on. Only when the <esc> key press is released (=KEYUP) would it activate the binding....

    question inactive-issue 
    opened by gilbh 6
  • [Bug] `autofocus_textarea` slows down switching to EDIT NORMAL in Word

    [Bug] `autofocus_textarea` slows down switching to EDIT NORMAL in Word

    If I set the following in .vincrc:

    set autofocus_textarea = true
    

    -- then the switch from INSERT to EDIT NORMAL in Word takes about a second, which is quite slow.

    With thanks!!

    question 
    opened by gilbh 6
  • [Feature] Add latest version on the Downloads page

    [Feature] Add latest version on the Downloads page

    Hi,

    This is the page: https://pit-ray.github.io/win-vind/downloads/

    It is a minor thing but will be useful to track the latest version. Right now the version is only given in the installer file name, but that requires to actually download the file in order to find out the version.

    Having it displays on this page (and others?) would make it is easy to follow up on what's new.

    Thanks for considering.

    opened by gilbh 5
  • [Question] A Question about Screenshoot

    [Question] A Question about Screenshoot

    Hi, thanks for your great work. But it doesn't seem work well when I was trying to capture a screenshoot by other tools, for example Snipaste. Only in the resident mode I can start up the screenshoot window, but I can't drag or move my cursor in that case. I wonder how to capture a screenshoot. Thanks a lot.

    opened by dp0qb 1
  • [Question] Are Firefox Tabs Supported with EasyClick like in Chrome?

    [Question] Are Firefox Tabs Supported with EasyClick like in Chrome?

    Are Firefox Tabs Supported with EasyClick like Chrome?

    The tabs in chrome have the text popup when you do FF in Normal GUI mode. Firefox however, doesn't appear to show the hotkeys for the tabs when doing FF

    opened by aus10code 0
  • [Question] new version?

    [Question] new version?

    Hello,

    I have been working with your amazing tool for a long time, following announces etc., but I want to make sure I did not miss any recent release. If I am not mistaken, a lot of new features and bug corrections were implemented since the last release of 4.3.3, which was a long time ago (maybe a year?).

    Just thought of asking about this. N pressure intended, as your contributions are greatly appreciated.

    Best

    opened by gilbh 14
  • [Bug] Windows Error Code: 5

    [Bug] Windows Error Code: 5

    About Bug

    When win-vind starts up with Windows, the following error shows

    issue

    A part of log is as follows

    ========== System Infomation ==========
    [Windows]
          Edition: Windows 10 Pro
          Version: 21H1
    Build Numbers: 10.0.19043
     Architecture: x64
    
    [win-vind]
          Version: 4.3.3
    =======================================
    
    [Error] open_startmenu failed. An runtime exception occurred from void __cdecl vind::bind::JumpToActiveWindow::sprocess(void). GetForegoundWindow return nullptr (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. An runtime exception occurred from void __cdecl vind::util::move_cursor(int,int). cannot send the moving event of the mouse (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    [Error] move_cursor_right failed. Cannot refresh all key state. An runtime exception occurred from void __cdecl vind::core::InputGate::release_keystate<const class vind::core::KeyCode*>(const class vind::core::KeyCode *,const class vind::core::KeyCode *). failed sending keyboard event (void __cdecl vind::bind::BindedFunc::error_process(const class std::exception &) const)
    [Error] Access is denied.
    

    Steps to reproduce.

    1. Select Start up with Windows.
    2. Reboot system.
    3. Don't enter the password immediately, wait for one or two minutes. Win10 will start all startup items even if I don't enter the password to login yet.
    4. Wait for screen to sleep (this step may be optional, but I can 100% reproduce the bug if I wait for the screen to turn black).
    5. Wake up the system to login and the error message shows up.

    Environments

    |Environments|Delete the example and fill in your information.| |:---:|:---| |Windows Edition|10 Pro| |Windows Version|21H1| |Windows Build|19043.1949| |Architecture|64bit| |win-vind Version|4.3.3| |win-vind Install Type|winget|

    accepted 
    opened by happyTonakai 6
  • [Question] Unmap multiple commands using <any>

    [Question] Unmap multiple commands using

    Question Hello. I'd like to use ctrl-w to close tab so I need to unmap all commands start with <ctrl-w> in GUI normal modes, including too many commands. So I want to use <any> as a wildcard, something like

    gnunmap <ctrl-w><any>
    

    however this doesn't work. Is there a good way to do it instead of unmap one by one? Thank you!

    enhancement accepted 
    opened by happyTonakai 1
Releases(v5.0.0-beta3)
This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI

ImGui Goodies This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI. Currently, th

null 95 Nov 19, 2022
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.

xtd Modern C++17/20 framework to create console (CLI), forms (GUI like WinForms) and tunit (unit tests like Microsoft Unit Testing Framework) applicat

Gammasoft 441 Jan 4, 2023
Window and GUI system based on Dear ImGui from OCornut

ImWindow Window and GUI system based on ImGui from OCornut. Include docking/floating window, multi window and multi render support. Platform Actually

Thibault Hennequin 715 Dec 20, 2022
Proof-of-concept code to reconstruct the GUI of a Xen guest running Windows

vmi-reconstruct-gui A proof-of-concept to reconstruct the GUI of a Xen VM running Windows 7. ❗ Disclaimer This repository is work in progress. It curr

Jan 12 Aug 21, 2022
Windows GUI version of the age file encryption tool (built on rage, the Rust implementation)

Windows GUI version of the age file encryption tool (built on rage, the Rust implementation)

Theron Spiegl 42 Dec 21, 2022
A lightweight modern C++11 library for Win32 API, using lambdas to handle Windows messages.

WinLamb A lightweight modern C++11 library for Win32 API, using lambdas to handle Windows messages. Overview Setup Example Classes summary License 1.

Rodrigo 239 Dec 28, 2022
Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io

BODEN CROSS-PLATFORM FRAMEWORK Build purely native cross-platform experiences with Boden Website ⬡ Getting Started ⬡ API Reference ⬡ Guides ⬡ Twitter

Ashampoo Systems GmbH & Co KG 1.6k Dec 27, 2022
Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL

NanoGUI NanoGUI is a minimalistic cross-platform widget library for OpenGL 3+, GLES 2/3, and Metal. It supports automatic layout generation, stateful

Mitsuba Physically Based Renderer 1.2k Dec 28, 2022
A barebones single-header GUI library for Win32 and X11.

luigi A barebones single-header GUI library for Win32 and X11. Building example Windows Update luigi_example.c to #define UI_WINDOWS at the top of the

Nakst 235 Dec 30, 2022
Nvui: A NeoVim GUI written in C++ and Qt

Nvui: A NeoVim GUI written in C++ and Qt

Rohit Pradhan 1.6k Jan 7, 2023
super duper simple gui for C, wrapping imgui and stb

super duper simle gui for C, wrapping imgui and stb You can use it as a static library with cmake. See the example directory for a complete example. E

Rasmus 11 May 19, 2022
U++ is a C++ cross-platform rapid application development framework focused on programmer's productivity. It includes a set of libraries (GUI, SQL, Network etc.), and integrated development environment (TheIDE).

Ultimate++ Ultimate++ is a C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of librar

Ultimate++ 564 Jan 8, 2023
raygui is a simple and easy-to-use immediate-mode-gui library.

raygui is a simple and easy-to-use immediate-mode-gui library.

Ray 2k Dec 30, 2022
A wallpaper changer using Wallhaven api. Written with C++/CLR, only 0.5 MB and have a GUI.

WHaven Wallpaper WHaven Wallpaper is a desktop wallpaper change program for change your wallpapers directly from wallhaven. Features You have a search

null 2 Aug 1, 2022
Fast, flexible and simple GUI.

MyGUI is a cross-platform library for creating graphical user interfaces (GUIs) for games and 3D applications. Website: http://mygui.info/ There you c

null 629 Dec 29, 2022
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.

About wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls. wxWidgets allows y

null 4.8k Jan 7, 2023
Examples, tutorials and applications for the LVGL embedded GUI library

Examples, tutorials and applications for the LVGL embedded GUI library

LVGL 441 Nov 11, 2022
HastyBadger is a branch of the excellent widget and GUI library Turbo Badger.

Branch Notice - HastyBadger Hasty is not Turbo. HastyBadger is a branch of the excellent widget and GUI library Turbo Badger. Notabe additions are c++

Michael Tesch 38 Nov 17, 2022
FlatUI is a immediate mode C++ GUI library for games and graphical applications.

FlatUI is a immediate mode C++ GUI library for games and graphical applications. Go to our landing page to browse our documentation.

Google 610 Dec 23, 2022