1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-18 06:28:02 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
nick-w-nick
94b44506ad Merge 295fe153ad into f578727349 2025-04-10 11:06:36 -04:00
jbranchaud
f578727349 Add Make Neovim The Default Way To View Man Pages as a Unix TIL 2025-04-09 21:25:17 -05:00
nick-w-nick
295fe153ad added mention of ES6 compatibility
Hello, I've added a small blockquote below the description to indicate that this method of accessing an indefinite number of function arguments has been superseded by the use of the spread operator via rest parameters for ES6+ compatibility.
2022-01-06 11:39:04 -05:00
3 changed files with 30 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
_1635 TILs and counting..._
_1636 TILs and counting..._
See some of the other learning resources I work on:
- [Ruby Operator Lookup](https://www.visualmode.dev/ruby-operators)
@@ -1620,6 +1620,7 @@ If you've learned something here, support my efforts writing daily TILs by
- [Load Env Vars In Bash Script](unix/load-env-vars-in-bash-script.md)
- [Look Through All Files That Have Been Git Stashed](unix/look-through-all-files-that-have-been-git-stashed.md)
- [Make Direnv Less Noisy](unix/make-direnv-less-noisy.md)
- [Make Neovim The Default Way To View Man Pages](unix/make-neovim-the-default-way-to-view-man-pages.md)
- [Manually Pass Two Git Files To Delta](unix/manually-pass-two-git-files-to-delta.md)
- [Map A Domain To localhost](unix/map-a-domain-to-localhost.md)
- [Negative Look-Ahead Search With ripgrep](unix/negative-look-ahead-search-with-ripgrep.md)

View File

@@ -5,6 +5,8 @@ an array-like object with all of the arguments to the function. Even if not
all of the arguments are referenced in the function signature, they can
still be accessed via the `arguments` object.
> For ES6+ compatibility, the `spread` operator used via [rest parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) is preferred over the `arugments` object when accessing an abritrary number of function arguments.
```javascript
function argTest(one) {
console.log(one);

View File

@@ -0,0 +1,26 @@
# Make Neovim The Default Way To View Man Pages
I was reading the help page for `:Man` which is the built-in plugin to Neovim
for viewing man pages within a Neovim session. In it, they mentioned that the
`MANPAGER` can be set to use Neovim instead of the default man page viewer.
This can be done by setting `MANPAGER` like so:
```bash
$ export MANPAGER='nvim +Man!'
```
After setting this, you can run something like `man git-restore` which will
open the man page for that command in a Neovim session using the Man page
plugin which can do things like follow links to other man pages (`K` or
`Ctrl=]`), quit by hitting `q`, as well as all the motions and search behavior
of Vim.
For long-term use, this can be set in your shell config, e.g. `~/.zshrc`. For
one-off use, you can include it as an env var for a single call to `man`:
```bash
MANPAGER='nvim +Man!' man git-restore
```
See `:h :Man` within a Neovim session for more details.