Public Access
Compare commits
3
Commits
dda59e048e
...
7ed28b5abf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ed28b5abf | ||
|
|
53da8295f9 | ||
|
|
56b1e1bb58 |
@@ -14,17 +14,15 @@ To remove a plugin run `:lua vim.pack.del({ "<plugin name>" })`.
|
|||||||
|
|
||||||
See custom keymaps with short descriptions with `<leader><leader>h`.
|
See custom keymaps with short descriptions with `<leader><leader>h`.
|
||||||
|
|
||||||
Split shortcuts:
|
Windowing shortcuts:
|
||||||
|
|
||||||
- `<leader>sv` open a vertical split
|
- `<leader>sv` open a vertical split
|
||||||
- `<leader>sh` open a horizontal split
|
- `<leader>sh` open a horizontal split
|
||||||
- `<leader>se` equalize split sizes
|
- `<leader>se` equalize split sizes
|
||||||
- `<leader>sc` close the current window
|
- `<leader>sc` close the current window
|
||||||
|
|
||||||
Resize shortcuts:
|
|
||||||
|
|
||||||
- `<leader>r-hjkl` to resize
|
- `<leader>r-hjkl` to resize
|
||||||
- `<leader>re` equalize split sizes
|
- `<leader>re` equalize split sizes
|
||||||
|
- `<C-hjkl>` move between windows
|
||||||
|
|
||||||
Buffer shortcuts:
|
Buffer shortcuts:
|
||||||
|
|
||||||
@@ -62,28 +60,12 @@ Refresh shortcuts (oil and buffers):
|
|||||||
Oil usage:
|
Oil usage:
|
||||||
|
|
||||||
- `<leader>dl` opens the file browser
|
- `<leader>dl` opens the file browser
|
||||||
- `<CR>` opens a file or enters a directory
|
- `-`, `<BS>` goes to the parent directory
|
||||||
- `-` goes to the parent directory
|
|
||||||
- `<BS>` also goes to the parent directory
|
|
||||||
- `<A-h>` also goes to the parent directory
|
- `<A-h>` also goes to the parent directory
|
||||||
- `<A-l>` opens the selected file or enters the selected directory
|
- `<A-l>` opens the selected file or enters the selected directory
|
||||||
- `<C-p>` previews the selected entry
|
- `<C-p>` previews the selected entry
|
||||||
- `gx` opens the file in external viewer
|
- `gx` opens the file in external viewer
|
||||||
|
|
||||||
## Window Navigation
|
|
||||||
|
|
||||||
Move between windows with:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
<C-hjkl>
|
|
||||||
```
|
|
||||||
|
|
||||||
Cycle through windows:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
<C-w>w
|
|
||||||
```
|
|
||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
|
|
||||||
Two options to leave terminal mode and return to normal mode:
|
Two options to leave terminal mode and return to normal mode:
|
||||||
@@ -106,6 +88,7 @@ Useful Mason commands:
|
|||||||
|
|
||||||
Useful LSP commands:
|
Useful LSP commands:
|
||||||
|
|
||||||
|
- `K` show the type and documentation for the symbol under the cursor
|
||||||
- `gd` go to definition
|
- `gd` go to definition
|
||||||
- `gD` go to declaration
|
- `gD` go to declaration
|
||||||
- `grd` list references
|
- `grd` list references
|
||||||
|
|||||||
@@ -44,6 +44,34 @@ require("oil").setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local oil_git_trie = require("oil-git.trie")
|
||||||
|
local oil_git_lookup = oil_git_trie.lookup
|
||||||
|
|
||||||
|
-- ugly internal monkey patch to not show partially git-ignored foldres as grey
|
||||||
|
rawset(oil_git_trie, "lookup", function(root, entry_path, git_root, exclude_ignored)
|
||||||
|
local status = oil_git_lookup(root, entry_path, git_root, exclude_ignored)
|
||||||
|
if status ~= "!!" or exclude_ignored then
|
||||||
|
return status
|
||||||
|
end
|
||||||
|
|
||||||
|
local relative_path = entry_path:sub(#git_root + 2)
|
||||||
|
local node = root
|
||||||
|
for segment in relative_path:gmatch("[^/\\]+") do
|
||||||
|
node = node.children[segment]
|
||||||
|
if not node then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- oil-git normally propagates an ignored child's status to every parent.
|
||||||
|
-- Only grey a directory when Git reported that directory itself as ignored.
|
||||||
|
if not node.is_dir_ignored then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
return status
|
||||||
|
end)
|
||||||
|
|
||||||
require("oil-git").setup({
|
require("oil-git").setup({
|
||||||
show_file_highlights = true,
|
show_file_highlights = true,
|
||||||
show_directory_highlights = true,
|
show_directory_highlights = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user