-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin: desk #40
Comments
for now, just lean on the various plugins defined above and set the keybindings to see how they feel. will have to add ctrlp back and confirm that it respects the tab container that vim-ctrlspace sets up. once that's done move ctrl-t to starting a terminal; leave leader t alone. |
ok, after getting your current keybindings using the other plugins close to this, the first step is probably figuring out how Ctrl-d-n is going to work. do a step at a time: open the tab, then name the tab, then scope buffers by tab. |
Ctrl-d-n was overloaded with new desk and name desk. going with ctrl-d-c for "create desk" and ctrl-d-n for name desk. |
ctrlp file search respects the vim-ctrlspace tab container, but the buffer search does not. oh well, looks like vim-ctrlspace has it's own fuzzy search. |
this will need os detection for the local desk project script runner. already in init.vim, but here's the vimscript for reference:
|
this looks super useful for containing buffers to a tab, i wouldn't be surprised if it was this simple in vim-ctrlspace:
|
got the tab rename to work by reaching into vim-ctrlspace and calling redraw. next up is to make C-d-c ask for a path (with tab to complete), then set tcd to that path, and set the tab name to the last dir on that path. |
the vim-ctrlspace fuzzy file search needs to ignore stuff like the .git, vendor, and node_modules dirs. here's the old ctrlp ignore:
|
Ctrl-d-z is now Ctrl-w-z for zooming windows via the vim-maximizer plugin. |
made some progress on |
taboo looks like it's got some handy tab open and set the name tricks. |
made some progress on the new desk function. found that it'd be nice to set the first tab to the tcd/cd on vim startup. might be able to do that by writing a function to get the tcd/cd, then set the tab name and call redraw at the bottom of vimrc. it would be nice for the plugin to do that automatically at startup, without users having to modify their vim config. one way to do this might be for the plugin to have it's own startup script, which renames the tab and calls redraw, but until this gets pulled out into it's own plugin maybe just hacking init.vim will be ok. |
i think what i'll do from here on is:
|
a question worth investigating: if nerdtree already has logic to search tcd, and you can hack ctrlp to only search tcd, then is vim-ctrlspace even necessary? let's find that out before the items listed above. also, some housekeeping: don't forget to update the readme with the appropriate keybindings in the |
ctrlp doesn't seem to search buffers based on the tcd, so i might be better to just hack on vim-ctrlspace's file and buffer search. that said, it'd be nice if the vim-ctrlspace search just used native vimscript instead of a go binary. can probably use at least some logic from ctrlp and glob to get that going. ok, going to move back to the todo list. |
ok, new todo list:
|
calling ctrlspace#tabs#CloseTab() closes all the windows and associated buffers (:q, tabclose, etc. leave the buffers around), but pops a dialog window at the bottom. going to try and sort that. |
meh. the popup is just asking what buffer you want to look at in the previous (re: left) tab after closing a tab. that's fine. |
there's a quirk with vim-ctrlspace's file search, where it tries to find a project root using .git, .svn, etc. and then index. trying to set it to tcd via DeskInit doesn't have much effect. might be worth fixing in the actual desk plugin. to reproduce:
|
ok, we've got a quirk in the last comment, the ctrlspace popup on tab close is actually potentially useful, and tree/search refresh are mapped. that leaves:
|
reading through vimscript the hard way, and thinking about desk, i have file name search, buffer name search, but i don't have a good file or buffer content search. ag might be a good tool for that (cross platform), using vimscript to leverage ag output and the quickfix window. also want the search scoped to the desk current directory. here's some logic for toggling the quickfix window:
|
got to chapter 42 this weekend, right where plugins start to get covered. learned a good bit. want to get through this last part then package marv. |
got a scaffold up for marv. honestly most of it's there, just need to iron out the kinks and get it functional. |
having tab-scoped (re: desk local) |
hmmm...alright. some modeling:
just thinking about this as a way to name classes/functions/state containers in the future. |
having a buffer name search and a file name search feels redundant. maybe it's the way the vim-ctrlspace search works, but the Ctrl-d-f finds the file, and will switch to a buffer if it's already open. that's...probably more than enough, esp. once that said, having a Ctrl-d-c for a file content search (via pt or ripgrep or whatever or just plain grep; all with good ignore rules like git grep or ctrl-p's rules for avoiding local dependency directories) sounds...rad. |
yeah, went ahead and removed the buffer name search. |
lol and just noticed that for some reason the vim-ctrlspace search doesn't search the autoload dir in vim plugins. sigh. lol probably better to gut that go search and try to just use whatever ctrlp does, probably with |
desk grep: Ctrl-d-g calls a go bin that wraps pt and asks for a search string, then passes in the exact search term to pt, search is opened in location window, jk to move up and down location window, enter to open file in buffer. search bin is local and built per arch. os detection calls the correct bin. |
removing the desk task runner logic; just use https://github.com/gulien/orbit |
also, instead of buffers, name them "pages" when in a desk scope. that would make projects...books, so tabs are "books." |
goneovim (new branch), will take care of this, and is worth it because it not only provides workspaces, it also allows connections to remote nvim instances. |
minimal plugin for more conventional (to me) project workspace management. leans on tabs and logic from other plugins (give them a shoutout in the readme), this just bundles them all up nicely and limits options so i don't step on my own feet.
desk -> single nvim instance
book -> vim tab (book on desk)
page -> vim buffer (page in book)
Bindings:
dependencies (to be forked and pulled in as needed):
desk sets these as default keybindings, probably using viml commands
The text was updated successfully, but these errors were encountered: