Skip to content

vim & nvim plugin for quickly print some thing base by filetype

Notifications You must be signed in to change notification settings

yaocccc/vim-echo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-echo

vim & nvim plugin for quickly print some thing base by filetype or filename

avatar

usage

  plug 'yaocccc/vim-echo'

  OR

  use { 'yaocccc/vim-echo', cmd = "VECHO" }
  " [ECHO] will be replace to your selected context.
  e.g. 
    Your selected context: hello
    fmt.Printf("[ECHO]: %s", [ECHO]) => fmt.Printf("hello: %s", hello);

  " you can set custom config for difference filename or file ext, or you can set it is ''
  let s:vim_echo_by_file = {
      \ 'vim': 'echo("[ECHO]:" . [ECHO])',
      \ 'go': 'fmt.Printf("[ECHO]: %+v\n", [ECHO])',
      \ 'js': 'console.log(`[ECHO]: ${[ECHO]}`)',
      \ 'ts': 'console.log(`[ECHO]: ${[ECHO]}`)',
      \ 'vue': 'console.log(`[ECHO]: ${[ECHO]}`)',
      \ 'sh': 'echo [ECHO]: $[ECHO]',
      \ 'zsh': 'echo [ECHO]: $[ECHO]',
      \ 'go.mod': '[ECHO]',
      \ 'json': '',
      \ }

  " keymap
  e.g.
    vnoremap <silent> C :<c-u>VECHO<cr>

Support


Buy Me A Coffee

About

vim & nvim plugin for quickly print some thing base by filetype

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published