Giter Site home page Giter Site logo

Comments (4)

adigitoleo avatar adigitoleo commented on June 13, 2024

Notably, :iabbrev _foo bar always works, this is the only non-alphanumeric character that is not affected it seems.

from neovim.

zeertzjq avatar zeertzjq commented on June 13, 2024

How is this a regression? The behavior is the same in v0.4.0.

from neovim.

zeertzjq avatar zeertzjq commented on June 13, 2024

I can't do :iabbrev @ii @include even with @ being present in my &iskeyword.

This works if you :set iskeyword+=@-@. This is because @ has a special meaning, as mentioned in :h 'isfname' which is referenced by :h 'iskeyword':

	If the character is '@', all characters where isalpha() returns TRUE
	are included.  Normally these are the characters a to z and A to Z,
	plus accented characters.  To include '@' itself use "@-@".  Examples:
		"@,^a-z"	All alphabetic characters, excluding lower
				case ASCII letters.
		"a-z,A-Z,@-@"	All letters plus the '@' character.

And the behavior matches :h abbreviations:

There are three types of abbreviations:

full-id	  The "full-id" type consists entirely of keyword characters (letters
	  and characters from 'iskeyword' option).  This is the most common
	  abbreviation.

	  Examples: "foo", "g3", "-1"

end-id	  The "end-id" type ends in a keyword character, but all the other
	  characters are not keyword characters.

	  Examples: "#i", "..f", "$/7"

non-id	  The "non-id" type ends in a non-keyword character, the other
	  characters may be of any type, excluding space and tab.

	  Examples: "def#", "4/7$"

So this is working as intended.

from neovim.

adigitoleo avatar adigitoleo commented on June 13, 2024

How is this a regression? The behavior is the same in v0.4.0.

Hmm, perhaps. I've had an :iabbrev :foo bar type of thing in my config for a while and this only came up recently (last couple of weeks). I don't mind, I just changed them to :iabbrev _foo bar, but that made me think it was a regression. It's possible this was caused by some more complex interaction.

from neovim.

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.