This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- -------------------------------- | |
| -- apply cursor to matching pattern (without touching the search register) | |
| -- -------------------------------- | |
| -- | |
| -- to use this, visually select some text with visual or line mode, enter a | |
| -- vim regex string, and a cursor will be placed on all matches. upon exiting, | |
| -- the cursors will enter follow mode. | |
| -- this *should* work with and without ui plugins like dressing or snacks input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- here are some functions to traverse lines while using f/t motions in nvim. the reason | |
| -- i have written them is because i can't get improved-ft to work. it's a little messy | |
| -- because my lua is a bit rusty. | |
| -- NOTE this intentionally doesn't do change/delete (eg dt<char>). the reason for this | |
| -- is because i am hitting enough accidental keybinds as it is, and if i want to do | |
| -- delete actions across lines then there are millions of LSP/treesitter binds that | |
| -- would probably do the job better. so dt<char> will work as normal. | |
| -- INSTRUCTIONS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- this probably isn't the most efficient way of doing this | |
| -- but i'm quite happy with it so i want to share it. | |
| -- function to check whether current buffer is modified | |
| local function modcheck() | |
| local current_buf = vim.api.nvim_get_current_buf() | |
| if vim.api.nvim_buf_get_option(current_buf, 'modified') then | |
| return true | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## about | |
| # this does two things 1) provides a visual indicator when moving between panes | |
| # 2) cleverly cycles between the previous pane on all windows across the session. | |
| # NOTE this script does echo out every single tmux focus switch to a file in /tmp/ | |
| # so unless you turn your machine off every night you'll want to find some way of | |
| # dealing with that. |