How to I always default to the raw text view mode? #1480
-
For my application, I'd prefer the raw text view mode. Sometimes it seems to automatically detect JSON and switch to the mode that is not raw. It's not blocking exactly because I can type Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm afraid you can't simply set it as a part of configuration i.e. as the default. I thought of creating an alias with You could create a script and install it in formats directory with short name so it would be easier to type. For instance when saved with the name If we knew how Alternatively you could make use of events feature (see issue #811). For this to work you probably need to know the information from the previous point or know how to run lnav command from inside SQL (if it's even possible). I'm sure @tstack would have valuable insights into all of these. |
Beta Was this translation helpful? Give feedback.
I'm afraid you can't simply set it as a part of configuration i.e. as the default.
I thought of creating an alias with
alias mylnav='lnav -c ":set-text-view-mode raw"'
and then usingmylnav
instead oflnav
but I'm not sure if the command is run after or before opening files and whether or not it makes difference here. In fact I don't know how to check the current view mode (raw or rendered) to check if it works.You could create a script and install it in formats directory with short name so it would be easier to type. For instance when saved with the name
r.lnav
you can execute it simply by typing|r
in lnav.If we knew how
:set-text-view-mode raw
changes SQL tables you could install.sql
…