diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2025-04-10 00:20:28 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2025-04-10 00:20:28 -0600 |
commit | d2325e040e2a4c2ea9d0d8c57af57bc13f7aeae7 (patch) | |
tree | 42cdc551faf3b3abbeb998166f00f937747fa6b1 /plugin/basename.lua | |
parent | b3b09ff479510abc51ffb88743bb353bcc15e165 (diff) | |
download | rneovim-userregs-main.tar.gz rneovim-userregs-main.tar.bz2 rneovim-userregs-main.zip |
"| - file contents register
" - visual selection register
" - timestamp register
" - uuid register
" - dirname register
Diffstat (limited to 'plugin/basename.lua')
-rw-r--r-- | plugin/basename.lua | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/plugin/basename.lua b/plugin/basename.lua deleted file mode 100644 index 84d2991..0000000 --- a/plugin/basename.lua +++ /dev/null @@ -1,26 +0,0 @@ ---- Basename Register: returns the current filename without path and extension. ---- ---- This is similar to the "%" register (full filename), but returns only ---- the basename with one extension removed. Useful, for example, when referencing ---- Java class names based on the file name. ---- ---- This register is read-only and assigned to the character '$'. - -local userregs = require("vim.userregs") -local api = vim.api - ----@type table<string, fun(regname: string): any> -local handler = {} - ---- Return the current buffer's basename without extension. ---- Equivalent to `expand('%:t:r')` -function handler.put(regname) - return vim.fn.expand('%:t:r') -end - --- Make this register read-only by omitting the yank handler. -handler.yank = nil - --- Register this handler under the user register '$'. -userregs.register_handler('$', handler) - |