There are often lots of brackets within a programming file. Therefore the efficiency of navigating between them becomes crucial for the overall pro...
For further actions, you may consider blocking this person and/or reporting abuse
Thats why i use vim
The usefulness of
[[and]]depends on the coding conventions you work with. In C, K&R style places the opening brace of a function at the start of a line. If you follow that part of K&R style, then[[and]]are useful for jumping to the previous/next function (and a repeat count works for jumping N functions). If you follow the{at the end of a line, even on function definitions, then the[[and]]operations are much less useful.If you're working in a language with different conventions, especially if the conventions are enforced by a formatter (
gofmt,rustfmt, etc), then they aren't as helpful. You may be reduced to using[]%and][%— jump to the end of the function and bounce back to the start — and heaven help you if you have stray unmatched curly braces in the function.Thanks for the article. I wasn't aware of
[]or][, nor of])or[(, nor of[{or]}.Python dev sit in corner.
Great plugins to improve handling brackets are:
Old but good, this Tim Pope's plugin: github.com/tpope/vim-surround
If you are in the Neovim world using Lua plugins: github.com/kylechui/nvim-surround
Year 2024 and which-key.nvim is still the best plugin.
Which-key.nvim
Honestly for me the % is not working, please advice