summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-04-11 11:44:18 +0100
committerAkshay <[email protected]>2021-04-11 11:44:18 +0100
commitbb0c74e9226c3f7d6f5f3129c551265abf0ac9c1 (patch)
treed1c45f0ff8362b69175a5736b704eafce412d170
parent433b4a53fac2c86f68403fbbfd7801525d21eb19 (diff)
add quickfix title name to statusline
-rw-r--r--plugin/maps.vim2
-rw-r--r--plugin/statusline.vim11
2 files changed, 11 insertions, 2 deletions
diff --git a/plugin/maps.vim b/plugin/maps.vim
index 188cb69..f3c5f76 100644
--- a/plugin/maps.vim
+++ b/plugin/maps.vim
@@ -7,13 +7,11 @@ map <leader>cc :w !xclip -sel c<CR>
7 7
8" normal 8" normal
9nnoremap <Leader>o : only<cr> 9nnoremap <Leader>o : only<cr>
10" nnoremap <Leader>l : Lines<cr>
11nnoremap <Leader>b : Buffers<cr> 10nnoremap <Leader>b : Buffers<cr>
12nnoremap <Leader>n : bnext<cr> 11nnoremap <Leader>n : bnext<cr>
13nnoremap <Leader>p : bprev<cr> 12nnoremap <Leader>p : bprev<cr>
14nnoremap <Leader>z : FZF<cr> 13nnoremap <Leader>z : FZF<cr>
15nnoremap <Leader>l : Lines<cr> 14nnoremap <Leader>l : Lines<cr>
16nnoremap <Leader>w : MtaJumpToOtherTag<cr>
17nnoremap <Leader>t : call GetTabber()<cr> 15nnoremap <Leader>t : call GetTabber()<cr>
18nnoremap <Leader><ESC> : nohlsearch<cr> 16nnoremap <Leader><ESC> : nohlsearch<cr>
19nnoremap <C-l> :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l> 17nnoremap <C-l> :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
diff --git a/plugin/statusline.vim b/plugin/statusline.vim
index 3e1c069..0a1f6c0 100644
--- a/plugin/statusline.vim
+++ b/plugin/statusline.vim
@@ -81,6 +81,15 @@ function! Filepath() abort
81 endif 81 endif
82endfunction 82endfunction
83 83
84function! QuickFixStatus() abort
85 let l:qfl=getqflist()
86 let l:qftitle = getqflist({'title' : 0}).title
87 if len(qfl) != 0
88 return l:qftitle
89 else
90 return ''
91endfunction
92
84function! LinterStatus() abort 93function! LinterStatus() abort
85 let sl = '' 94 let sl = ''
86 let msgs = [] 95 let msgs = []
@@ -113,6 +122,8 @@ function! StatusLine(mode) abort
113 let l:line.='%7*%{StatuslineGit()}' 122 let l:line.='%7*%{StatuslineGit()}'
114 let l:line.='%<' 123 let l:line.='%<'
115 let l:line.=Filepath() 124 let l:line.=Filepath()
125 let l:line.='%5*'
126 let l:line.=QuickFixStatus()
116 127
117 let l:line.='%5*' 128 let l:line.='%5*'
118 let l:line.=' %{ReadOnly()} %w%*' 129 let l:line.=' %{ReadOnly()} %w%*'