Giter Club home page Giter Club logo

Comments (6)

alexherbo2 avatar alexherbo2 commented on May 25, 2024 2
nop plug alexherbo2/auto-pairs.kak %{
  …
}

from plug.kak.

andreyorst avatar andreyorst commented on May 25, 2024

Yeah, I've thought about it, and actually doing implementation of it right now.

from plug.kak.

andreyorst avatar andreyorst commented on May 25, 2024

@alexherbo2 I've pushed the changes to the Kakoune_dev branch. I'll likely backport it to master if it is working fine. I've tested it with these configurations:

plug "andreyorst/fzf.kak" %{
	map -docstring 'fzf mode' global normal '<c-p>' ': fzf-mode<ret>'
	set-option global fzf_preview_width '65%'
	evaluate-commands %sh{
		if [ ! -z "$(command -v fd)" ]; then
			echo "set-option global fzf_file_command 'fd . --no-ignore --type f --follow --hidden --exclude .git --exclude .svn'"
		else
			echo "set-option global fzf_file_command \"find . \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type f -follow -print\""
		fi
		if [ ! -z "$(command -v bat)" ]; then
			echo "set-option global fzf_highlighter 'bat'"
		elif [ ! -z "$(command -v highlight)" ]; then
			echo "set-option global fzf_highlighter 'highlight'"
		fi
	}
}

# automatic pair insertion and surroundig
plug "alexherbo2/auto-pairs.kak" %{
	hook global WinCreate .* %{ auto-pairs-enable }
	map global user -docstring 'surround selection' 's' ': auto-pairs-surround<ret>'
}

The downside of this method is that you can't just comment the plug line to not to load the plugin, but need to comment all the lines, which was not the case of initial implementation. I'm thinking about adding some sort of plug-config "plugin" "configurations" for such purposes, but I'm not sure if it is necessary, because if plugin wasn't loaded because it is uninstalled or contains error, configurations wouldn't be applied.

from plug.kak.

alexherbo2 avatar alexherbo2 commented on May 25, 2024

You can prefix the command with a nop.

from plug.kak.

andreyorst avatar andreyorst commented on May 25, 2024

What command?

from plug.kak.

andreyorst avatar andreyorst commented on May 25, 2024

Ah, got it. Nice idea

from plug.kak.

Related Issues (20)

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.