Comments (1)
I resolved this issue. Pasting code for reference below if anyone needs it.
-- Map F5 key to copy and paste in the terminal and set no paste mode.
-- Elements of array
-- [0] : if paste toggle was enabled
-- [1] : if tagbar was open
-- [2] : if line numbers were enabled
-- [3] : if NvimTree was opened
_setpaste = {false, false, false, false}
function setpastetoggle()
local has_nvim_tree,view = pcall(require,'nvim-tree.view')
if _setpaste[0] then
_setpaste[0] = false
vim.api.nvim_command(':IndentBlanklineEnable')
vim.wo.number = _setpaste[2]
if _setpaste[1]==1 then
vim.api.nvim_command(':TagbarOpen')
end
if _setpaste[3] then
vim.cmd("NvimTreeOpen")
end
else
-- Store the state
_setpaste[0] = true
_setpaste[1] = vim.fn['tagbar#IsOpen']()
_setpaste[2] = vim.wo.number
_setpaste[3] = false
-- Check if NVIM tree is open
if has_nvim_tree then
_setpaste[3] = view.is_visible()
if view.is_visible() then
vim.cmd("NvimTreeClose")
end
end
vim.api.nvim_command(':IndentBlanklineDisable')
vim.fn['tagbar#CloseWindow']()
vim.wo.number = false
end
end
from vapournvim.
Related Issues (20)
- Mouse not working on bufferline HOT 2
- ZenMode not working
- Error detected when opening Config HOT 1
- Color scheme partially stuck as rose-pine HOT 1
- Provide an option to disable autoformatting HOT 1
- clean install - null_ls failure
- Adding auxiliary plugin rust-tools to lsp_installer.on_server_ready
- Configuring null_ls
- Docs?
- How to load extensions or autoload required plugins
- "Black hole" Register mappings not working HOT 2
- Can not supress <A-j>, <A-k> keybinds
- Why I've not been maintaining this project HOT 1
- Minimum gcc 7 is required for nvim-treesitter
- Lsp config not found on fresh install - Mac HOT 4
- support | help? HOT 2
- File/Folder Icon not showing
- E492: Not an editor command: PackerSync HOT 2
- cmp deprecated function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vapournvim.