Skip to content

lt616/Voice-vim-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 

Repository files navigation

Voice-vim-editor

Requirements

Usage

Type the following command in vim command(line) mode. Commands are non-case-sensitive

:call VoiceCommand("...")

Commands to Implement

  • Mode switch command

    • Switch to insert mode [vim command: i] user can type by keyboard in insert mode.
    VoiceCommand("switch insert")
    
    • Switch to normal mode [vim command: <esc>]
    VoiceCommand("switch normal")
    
  • Char level commands (Insert mode)

    • Insert text [vim command: a]

      Insert text in current cursor position.

      VoiceCommand("add [text]")
      
    • Delete text [vim command: dnl / dnh / ndd /ndl / dnw / dnb]

      Delete text around current cursor position. Text can be delete in unit of char, word or line. You can specific number of units to delete.

      You can also define the delete direction (forward/backward). If the direction is not specified, it is forward by default.

      VoiceCommand("delete n [char/word/line] [forward/backward]")
      
    • Move cursor [vim command: gg / hjkl]

      • Move cursor to certain line
        VoiceCommand("move line n")
        
      • Move cursor in unit of char, word or line.
        VoiceCommand("move n [char/word/line] [forward/right/down/backward/left/up]")
        
    • Search text [vim command: \ / next / *] Unimplement: Highlight for search result.

      • Search word the cursor currently on
        VoiceCommand("search current word")
        
      • Search [text]
        VoiceCommand("search [text]")
        
      • Show next search result
        VoiceCommand("next")
        
  • Node level commands

    • Select current node (the most inner node the cursor currently at)

      VoiceCommand("select current node")
      

      If there is no node at current cursor position, it will warning error. Otherwise highlight the most inner node in visual mode.

    • Select parent node of current node

      VoiceCommand("select parent node")
      

      If there is no node selected or no parent node, shows error message. Otherwise select parent of current selected node in visual mode.

    • Select first child node of current node

      VoiceCommand("select child node")
      

      If there is no node selected or no child node, shows error message. Otherwise select the first child of current selected node in visual mode.

    • Select previous sibling of current node

      VoiceCommand("select previous sibling node")
      

      If there is no node selected or no previous sibling node, shows error message. Otherwise select the first child of current selected node in visual mode.

    • Select next sibling of current node

      VoiceCommand("select next sibling node")
      

      If there is no node selected or no next sibling, shows error message. Otherwise select the next sibling node in visual mode.

    • Search a function name / variable name

      VoiceCommand("search node [function / variable] [name]")
      

      Show the first occurrence after current cursor position.

      VoiceCommand("next result")
      

      Show next result in order.

    • Search a declaration of a function / variable

      VoiceCommand("search node declaration [name]")
      

      Show the declaration of the function or declaration.

    • Search if / switch / for / while blocks with conditions

      VoiceCommand("search node [if / switch / for / while] [conditions]")
      

      Currently a searchable condition can only be variable name. Need to modify libclang-vim to enable primitive value search. A condition can be name of a variable, a integer / float / double / char / string literal.

      Not support 1: do while; 2: in-line if expression yet; 3: nested search

    • Search line contains keywords

      VoiceCommand("search node [conditions]")
      

      Search a line contains all specified keywords. The entire line will be highlighted instead of a node. A keyword can be name of a variable, a integer / float / double / char / string literal.

  • Other commands

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors