Code Monkey home page Code Monkey logo

coc-smartf's Introduction

coc-smartf

Make jump to character easier.

Git

Install

Run command:

:CocInstall coc-smartf

in your vim.

Usage

" press <esc> to cancel.
nmap f <Plug>(coc-smartf-forward)
nmap F <Plug>(coc-smartf-backward)
nmap ; <Plug>(coc-smartf-repeat)
nmap , <Plug>(coc-smartf-repeat-opposite)

augroup Smartf
  autocmd User SmartfEnter :hi Conceal ctermfg=220 guifg=#6638F0
  autocmd User SmartfLeave :hi Conceal ctermfg=239 guifg=#504945
augroup end

Options

  • smartf.timeout: timeout for jump in milliseconds, default 1000.
  • smartf.jumpOnTrigger: Jump to first available character on trigger, default true.
  • smartf.wordJump: Consider first word character for jump only, default: true.
  • smartf.charactersIgnoreByNavigator: Characters will not become a character for navigator, default: [].

Related

License

MIT

coc-smartf's People

Contributors

0xflotus avatar camouflager avatar chemzqm avatar dependabot[bot] avatar iamcco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

coc-smartf's Issues

加入行跳转和双向跳转功能?

这个插件很好用:轻量级、响应速度快。

想用来代替easymotion,平常用的最多就是这两个功能,对应easymotion的<Plug>(easymotion-bd-jk)<Plug>(easymotion-s)。老兄可否支持下 😸

Jumping in visual mode

Hi, thanks for the amazing plugin!

Is there any way to make it work in visual mode, so we can highlight blocks of code by jumping to certain word?

coc-smartf-repeat behavior when mapped to `;`

hi, i currently have the following key maps:

nmap f <Plug>(coc-smartf-forward)
nmap F <Plug>(coc-smartf-backward)
nmap ; <Plug>(coc-smartf-repeat)
nmap , <Plug>(coc-smartf-repeat-opposite)

i notice that when there are many matches to a query character, the key ; is used to jump to matches that could not be indexed by using a-z0-1,. , so to jump back you might have to press ; then c (if it were the 41st match , for example). If I initiate a repeat-opposite search by pressing ,, and any of the results are so far away in the match jump list to require a ; key press, the plugin jumps to the match indicated by ., then switches to a repeat search, in opposite direction of original repeat-opposite search.. I would expect it to realize i'm in the middle of a repeat-opposite search and continue jumping through match list in that direction.
hope that makes sense.

Pressing f removes all " in a json file

Before:

{                                                                                                                                                                                                                      "coc.preferences.formatOnType": true,
    "signature.enable": true,
    "tsserver.npm": "/home/name/.nvm/versions/node/v12.6.0",
    "tsserver.formatOnType": false,
    "typescript.showUnused": false,
    "javascript.preferences.quoteStyle": "single",
    "javascript.validate.enable": false,
    "suggest.noselect": false
}
   

after pressing f:

{
  coc.preferences.formatOnType: true,
  signature.enable: true,
  tsserver.npm: /home/r/.nvm/versions/node/v12.6.0,
  tsserver.formatOnType: false,
  typescript.showUnused: false,
  javascript.preferences.quoteStyle: single,
  javascript.validate.enable: false,suggest.noselect: false
}

Setting json.format.enable: false makes no difference.
I have coc-json installed. If I uninstall it it'a a bit better: the " are removed after f and once I press the target they come back.

Custom colour config

This is a feature request, I'll write a PR for it if you think it's a good feature.

It would be nice if you could configure the colours (foreground and background).

I experimented a little bit and I think I could just add:

syntax off
hi Normal ctermfg=COLOUR
hi Conceal ctermfg=COLOUR

and then syntax on at the end.

I don't know a lot about how vim handles colours, I just did some poking around in the default colour scheme files. On my vim this worked just changing ctermfg but I'm guessing guifg also needs to be set.

make f and T as an operator multiline and add t and T

example:

This is a 
text in two lines

imagine the cursor is on the T.
With clever-f for example dfo would delete till the two in the second line. Now nothing happens.

and it would be awesome to have also t and T
Edit: I meant as 'motion' not operator command

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.