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
-- Function to get the selected text. | |
-- It handles when current mode is visual mode and when visual mode has ended. | |
-- It handle visual, visual line and visual block modes | |
-- The return is a list with the selected text per line from top to bottom and from left to right. | |
-- | |
-- Based on the answers in the stackoverflow post: | |
-- https://stackoverflow.com/questions/1533565/how-to-get-visually-selected-text-in-vimscript/28398359 | |
-- | |
-- It has great answers but none quite behave as I expected, so this is my take on it. |
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
π :smile: | |
π :laughing: | |
π :blush: | |
π :smiley: | |
βΊοΈ :relaxed: | |
π :smirk: | |
π :heart_eyes: | |
π :kissing_heart: | |
π :kissing_closed_eyes: | |
π³ :flushed: |
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
# For windows powershell and pwsh | |
Set-PSReadLineKeyHandler -Chord 'ctrl+o,ctrl+e' -ScriptBlock { | |
$line = $cursor = $proc = $null | |
$editorArgs = @() | |
# Change this as you prefer | |
$editor = if ($env:EDITOR) { $env:EDITOR } | |
else { 'vim' } | |
try { | |
$tmpf = New-TemporaryFile |