Comments (5)
How often does neovim crash that this becomes relevant lol?
Also I don't think it's as obvious as you say that autowrite "should" save on abort. In all cases now autowrite is triggered by a deliberate action by the user, while this will write on any random state it happens to be on. Do the recovery functionality/swap mechanism not essentially fulfill this need anyway?
from neovim.
preserve_exit
is called on deadly signal:
Lines 180 to 181 in a2d510e
IIUC, that only writes swap files. For SIGHUP/SIGQUIT (but not others like SIGTERM) maybe it makes sense to also write the buffer contents.
from neovim.
How often does neovim crash that this becomes relevant lol?
Itβs not relevant for crashes, but the use case that makes me want such a functionality is the following: I wanted a "quick and dirty" neovim scratchpad windows in my desktop environment, and Iβm used to quit windows through my DE shorcuts, which calls a SIGHUP.
I agree that there are multiple workarounds for this particular usage but as @justinmk says for signals like SIGHUP or SIGQUIT (but not SIGTERM, I agree), I thought it would make more sense that neovim goes through its usual exit sequence as a :q
would.
from neovim.
'autowrite' already (should) works like this for :suspend
(SIGTSTP). And 'autowriteall' is intended to extend 'autowrite' behavior for "quit" (:help autowriteall
mentions "closing the Vim window").
Proposal
- Respect 'autowriteall' for SIGHUP/SIGQUIT.
- Are
VimLeave
/VimLeavePre
triggered on SIGHUP/SIGQUIT? Or should they be? Or should theSignal
autocmd allow hooking into SIGHUP/SIGQUIT?
from neovim.
Are VimLeave/VimLeavePre triggered on SIGHUP/SIGQUIT? Or should they be?
I believe, they should if v:dying == 1
(i.e. only one deadly signal caught), as documented at :h v:dying
.
from neovim.
Related Issues (20)
- inconsistent TSNode:range().end_row inclusiveness HOT 2
- LSP RPC fails to parse multiple header fields
- The results of virtcol2col in Nvim 0.10 and Nvim 0.9.5 are inconsistent HOT 7
- OSC 52 is enabled in tmux+nvim but does not work HOT 1
- Add LSP client flag to pull diagnostics on save HOT 1
- HTML treesitter make neovim crash. HOT 1
- cursorline, cursorcolumn, colorcolumn broken in new 0.10 colorscheme in Apple Terminal HOT 4
- nvim_buf_get_mark returns incorrect value of `'` mark HOT 3
- Angular template filetype detection HOT 2
- cursor not set properly when applying text edits from mapping
- CTRL-W waits for confirmation if remapped to a custom action. HOT 2
- File change history breaks when using neovim with rust-analyzer HOT 2
- Bug in `vim.api.keyset.hl_info` type definition
- Due to LuaJIT, Plugins aren't compatible with Lua 5.1 even if they don't require LuaJIT HOT 21
- [Treesitter] Detecting injected languages in headless Neovim instance fails HOT 2
- `'` mark gets restored automatically after nvim_buf_del_mark HOT 3
- "starts at certain column" alignment for virtual text
- nvim_buf_get_extmarks has wrong return value annotation HOT 3
- Autocommand `FileType` called twice for Treesitter query files HOT 1
- Syntax highlighting for plant uml HOT 1
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 neovim.