You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-32Lines changed: 64 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,47 +119,79 @@ Note: `path` corresponds to the folder the `file_browser` is currently in.
119
119
120
120
`telescope-file-browser.nvim` comes with a lot of default mappings for discoverability. You can use `telescope`'s `which_key` (insert mode: `<C-/>`, normal mode: `?`) to list mappings attached to your picker.
|`<C-o>/o`| Open file/folder with default system application |
130
-
|`<C-b>/b`| Go to parent directory |
131
-
|`<C-e>/e`| Go to home directory |
132
-
|`<C-w>/w`| Go to current working directory (cwd) |
133
-
|`<C-t>/t`| Change nvim's cwd to selected folder/file(parent) |
134
-
|`<C-f>/f`| Toggle between file and folder browser |
135
-
|`<C-h>/h`| Toggle hidden files/folders |
136
-
|`<C-s>/s`| Toggle all entries ignoring `./` and `../`|
137
-
138
-
`path` denotes the folder the `file_browser` is currently in.
139
-
140
-
#### Remappings
141
-
142
-
As part of the [setup](#setup-and-configuration), you can remap actions as you like. The default mappings can also be found in this [file](https://github.com/nvim-telescope/telescope-file-browser.nvim/blob/master/lua/telescope/_extensions/file_browser.lua).
122
+
The code snippet below highlights how can customize your own mappings. It is not required to map the `telescope-file-browser`-specific defaults (telescope [defaults](https://github.com/nvim-telescope/telescope.nvim#default-mappings) not shown)! They are merely provided to simplify remapping.
["f"] =fb_actions.toggle_browser, -- toggle between file and folder browser
176
+
["="] =fb_actions.change_cwd, -- change nvim cwd to selected file (parent) or folder
177
+
["~"] =fb_actions.goto_home_dir, -- go to home directory
178
+
["`"] =fb_actions.goto_cwd, -- go to home directory
179
+
["+"] =fb_actions.toggle_all, -- toggle selection of all shown entries ignoring `.` and `..`
180
+
[";"] =fb_actions.toggle_hidden, -- toggle showing hidden files and folders
181
+
182
+
-- your custom normal mode mappings
183
+
...
159
184
},
160
-
...
185
+
},
186
+
},
187
+
},
188
+
}
189
+
161
190
```
162
-
See [fb_actions](https://github.com/nvim-telescope/telescope-file-browser.nvim/blob/master/lua/telescope/_extensions/file_browser/actions.lua) for a list of native actions and inspiration on how to write your own custom action. As additional reference, `plenary`'s [Path](https://github.com/nvim-lua/plenary.nvim/blob/master/lua/plenary/path.lua) library powers a lot of the built-in actions.
191
+
192
+
Once more, `path` denotes the folder the `file_browser` is currently in.
193
+
194
+
Furthermore, see [fb_actions](https://github.com/nvim-telescope/telescope-file-browser.nvim/blob/master/lua/telescope/_extensions/file_browser/actions.lua) for a list of native actions and inspiration on how to write your own custom action. As additional reference, `plenary`'s [Path](https://github.com/nvim-lua/plenary.nvim/blob/master/lua/plenary/path.lua) library powers a lot of the built-in actions.
163
195
164
196
For more information on `telescope` actions and remappings, see also the [upstream documentation](https://github.com/nvim-telescope/telescope.nvim#default-mappings) and associated vimdocs at `:h telescope.defaults.mappings`.
0 commit comments