Comments (4)
Sorry for this late reply, and thank you for your appreciation!
Compact mode is an interface that looks like quickfix but does not share same behaviors, if you prefer real quickfix window, a quick & dirty solution is using g:CtrlSFAfterMainWindowInit
hook.
function! g:CtrlSFAfterMainWindowInit()
close
copen
endfunction
Compact mode is a design choice when I didn't fully understand quickfix window. As there are many plugins which enhance quickfix window recently, maybe I'll deprecate the compact mode later.
from ctrlsf.vim.
Thank you for the help! @dyng - This works great ❤️
I'm assuming there wouldn't be a way to get the best of both worlds is it? - I mean having a way to rename things (edit mode) + quick fix list together.
from ctrlsf.vim.
I think let me close this issue as I got the answer for the quickfix list, I had created a separate issue asking that here: #339
from ctrlsf.vim.
Just want to let you know that, the above suggested solution to provide CtrlSFAfterMainWindowInit has some edgecase, especially when doing repeat searches breaks with the following error:
" previous config
let g:ctrlsf_default_view_mode = 'compact' " Quickfix like view
let g:ctrlsf_populate_qflist = 1
let g:ctrlsf_auto_close = {
\ "compact": 0
\}
let g:ctrlsf_mapping = {
\ "next": "j",
\ "prev": "k",
\ }
let g:ctrlsf_auto_focus = {
\ "at": "start"
\ }
nnoremap <Leader>/ :CtrlSF<Space>
" Opens quickfix window instead of compact window
" Because compact window doesn't stay in sync with quickfix
" https://github.com/dyng/ctrlsf.vim/issues/340
function! g:CtrlSFAfterMainWindowInit()
close
copen
endfunction
Error detected while processing function ctrlsf#Search[15]..<SNR>107_ExecS
earch[19]..<SNR>107_DoSearchAsync[4]..<SNR>107_Open[1]..ctrlsf#win#OpenMai
nWindow[67]..<SNR>108_InitMainWindow:
line 7:
E21: Cannot make changes, 'modifiable' is off: fileformat=unix
Press ENTER or type command to continue
Removing that function & using the following configuration worked for me 🎉
" New config
let g:ctrlsf_default_view_mode = 'compact' " Quickfix like view
" Use quick fix list to populate & open instead of ctrlsf window
" https://github.com/dyng/ctrlsf.vim/issues/340
let g:ctrlsf_populate_qflist = 1
let g:ctrlsf_auto_close = 1
let g:ctrlsf_auto_qf = 1
let g:ctrlsf_mapping = {
\ "next": "j",
\ "prev": "k",
\ }
let g:ctrlsf_auto_focus = {
\ "at": "start"
\ }
nnoremap <Leader>/ :CtrlSF<Space>
from ctrlsf.vim.
Related Issues (20)
- preview window positioning HOT 6
- Error in ctrlsf#fs#FindProjectRoot HOT 4
- Keymap to open file in a vertical split HOT 2
- Question: Can I map or default the compact style to use quickfix list? HOT 1
- 查找时提示winlayout未定义 HOT 5
- How to specify search path? HOT 3
- *.hpp can't be find as default HOT 2
- search word with -W, the matched lines in result is not right HOT 1
- Which regex engine? HOT 1
- "free(): invalid pointer" when doing async searches with neovim HOT 2
- Make filename not editable HOT 2
- async chops off first character when editing many files HOT 1
- preview with mouse
- Is it possible to search sentences rather than just a single word? HOT 2
- ctrlsf_backend keeps miserror HOT 3
- Question: is it possible to customize search for a word?
- How can I replace all occurence of the searched keyword? HOT 3
- Error detected while processing - Invalid argument HOT 1
- Feature request/query: how to pass a list of files to grep through? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctrlsf.vim.