All Projects → gbprod → cutlass.nvim

gbprod / cutlass.nvim

Licence: WTFPL license
Plugin that adds a 'cut' operation separate from 'delete'

Programming Languages

lua
6591 projects
Makefile
30231 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to cutlass.nvim

nvim-highlite
A colorscheme template that is "lite" on logic for the developer.
Stars: ✭ 163 (+108.97%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
qf helper.nvim
A collection of improvements for the quickfix buffer
Stars: ✭ 70 (-10.26%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
lspcontainers.nvim
Neovim plugin for lspcontainers.
Stars: ✭ 157 (+101.28%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
code runner.nvim
Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
Stars: ✭ 234 (+200%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
aerial.nvim
Neovim plugin for a code outline window
Stars: ✭ 485 (+521.79%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
substitute.nvim
Neovim plugin introducing a new operators motions to quickly replace and exchange text.
Stars: ✭ 82 (+5.13%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
nvim-ghost.nvim
👻 GhostText plugin for Neovim with zero dependencies 🎉 Supports neovim running inside WSL too! 🥳 Windows/Linux/macOS supported out-of-the-box! 😄 (Other OSes need python3.6+ installed)
Stars: ✭ 32 (-58.97%)
Mutual labels:  nvim, neovim-plugin, nvim-plugin
nvim-todoist.lua
Todoist plugin for Neovim in pure Lua, inspired by https://github.com/romgrk/todoist.nvim, which you should use instead
Stars: ✭ 22 (-71.79%)
Mutual labels:  nvim, neovim-plugin
Neovim-from-scratch
📚 A Neovim config designed from scratch to be understandable
Stars: ✭ 3,825 (+4803.85%)
Mutual labels:  nvim, nvim-plugin
vim-lamp
💡Language Server Protocol client for Vim.
Stars: ✭ 34 (-56.41%)
Mutual labels:  nvim, nvim-plugin
cargo-limit
Cargo with less noise: warnings are skipped until errors are fixed, Neovim integration, etc.
Stars: ✭ 105 (+34.62%)
Mutual labels:  nvim, neovim-plugin
neovim-lua-plugin-boilerplate
Starter template for creating Neovim Lua plugins
Stars: ✭ 28 (-64.1%)
Mutual labels:  nvim, neovim-plugin
comment-box.nvim
✨ Clarify and beautify your comments using boxes and lines.
Stars: ✭ 91 (+16.67%)
Mutual labels:  nvim, neovim-plugin
modes.nvim
Prismatic line decorations for the adventurous vim user
Stars: ✭ 299 (+283.33%)
Mutual labels:  nvim, neovim-plugin
nvim-config
My neovim config
Stars: ✭ 63 (-19.23%)
Mutual labels:  nvim, neovim-plugin
cmp-tmux
Tmux completion source for nvim-cmp and nvim-compe
Stars: ✭ 98 (+25.64%)
Mutual labels:  neovim-plugin, nvim-plugin
awesome-neovim
Awesome Configurations for C/C++,Zig,Web and Lua development in NeoVim
Stars: ✭ 54 (-30.77%)
Mutual labels:  nvim, neovim-plugin
firvish.nvim
WIP
Stars: ✭ 31 (-60.26%)
Mutual labels:  nvim, neovim-plugin
feline.nvim
A minimal, stylish and customizable statusline for Neovim written in Lua
Stars: ✭ 867 (+1011.54%)
Mutual labels:  nvim, neovim-plugin
navigator.lua
Source code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.
Stars: ✭ 781 (+901.28%)
Mutual labels:  neovim-plugin, nvim-plugin

✂️ cutlass.nvim

Lua GitHub Workflow Status

Cutlass overrides the delete operations to actually just delete and not affect the current yank.

Features

It overrides the following keys to always use the black hole register: c, C, s, S, d, D, x, X.

Note that if you have already mapped these keys to something else (like we do below with x) then it will not change it again.

🤔 Why would you want to do this?

See here. This plugin already exists in vimscript. I hope this version in lua will be more efficient :)

⚡️ Requirements

  • Neovim >= 0.5.0

📦 Installation

Install the plugin with your preferred package manager:

packer

-- Lua
use({
  "gbprod/cutlass.nvim",
  config = function()
    require("cutlass").setup({
      -- your configuration comes here
      -- or leave it empty to use the default settings
      -- refer to the configuration section below
    })
  end
})

vim-plug

" Vim Script
Plug 'gbprod/cutlass.nvim'
lua << EOF
  require("cutlass").setup({
    -- your configuration comes here
    -- or leave it empty to use the default settings
    -- refer to the configuration section below
  })
EOF

⚙️ Configuration

Cutlass comes with the following defaults:

{
  cut_key = nil,
  override_del = nil,
  exclude = {},
}

cut_key

Default : nil

After setting up this plugin, all of these operations will simply delete and not cut. However, you will still want to have a key for 'cut', which you can add by setting the cut_key value when setting up the plugin. (m or x are recommended)

This will create those bindings :

nnoremap m d
xnoremap m d
nnoremap mm dd
nnoremap M D

override_del

Default : nil

By default, this plugin doesn't remap the <Del> key to use the blackhole register (and it will work as the old x key). By setting override_del to true, <Del> key will not cut any more and not afect your current yank.

exclude

Default: {}

For some reason, you may doesn't want cutlass to override some keys, you can exclude mappings to be set by adding this to the exclude option using format "{mode}{key}".

Eg. If you want to exclude s key in normal mode, sets exclude option to { "ns" } ; If you want to exclude <bs> key in select mode, sets exclude option to { "s<bs>" }.

🤝 Integration

svermeulen/vim-yoink

If you have svermeulen/vim-yoink installed, it will work seemlessly as original svermeulen/vim-cutlass. Just follow the integration instructions.

ggandor/lightspeed.nvim

When you're using plugins like ggandor/lightspeed.nvim, you should not want cutlass to remap the s key. You can do this using the exclude option:

use({
  "gbprod/cutlass.nvim",
  config = function()
    require("cutlass").setup({
        exclude = { "ns", "nS" },
    })
  end
})

🎉 Credits

This plugin is a lua version of svermeulen/vim-cutlass (based off of vim-easyclip and also Drew Neil's ideas)

Credit to m00qek lua plugin template

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].