-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a preview window for selecting locations to open
- Loading branch information
Showing
6 changed files
with
104 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
" Close the ALEPreviewWindow window with the q key. | ||
noremap <buffer> q :q!<CR> | ||
" Disable some keybinds for the selection window. | ||
noremap <buffer> v <NOP> | ||
noremap <buffer> i <NOP> | ||
noremap <buffer> I <NOP> | ||
noremap <buffer> <C-q> <NOP> | ||
noremap <buffer> <C-v> <NOP> | ||
noremap <buffer> <S-v> <NOP> | ||
noremap <buffer> a <NOP> | ||
noremap <buffer> A <NOP> | ||
noremap <buffer> o <NOP> | ||
noremap <buffer> O <NOP> | ||
" Keybinds for opening selection items. | ||
noremap <buffer> <CR> :call ale#preview#OpenSelectionInBuffer()<CR> | ||
noremap <buffer> t :call ale#preview#OpenSelectionInTab()<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
if exists('b:current_syntax') | ||
finish | ||
endif | ||
|
||
syn match alePreviewSelectionFilename /\v^([a-zA-Z]?:?[^:]+)/ | ||
syn match alPreviewNumber /\v:\d+:\d+$/ | ||
|
||
hi def link alePreviewSelectionFilename String | ||
hi def link alePreviewNumber Number | ||
|
||
let b:current_syntax = 'ale-preview-selection' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters