ratmav / desk Goto Github PK
View Code? Open in Web Editor NEWsugar layer for vim buffer, window, tab, and file management.
License: MIT License
sugar layer for vim buffer, window, tab, and file management.
License: MIT License
make these configurable, but go ahead and set these defaults:
" desk {{{
" open a new book.
nnoremap <silent><C-d>n :execute 'DeskBookNew'<CR>
" change focus to the next book on the right.
nnoremap <silent><C-d>l :execute 'DeskBookNext'<CR>
" change focus to the previous book on the left.
nnoremap <silent><C-d>h :execute 'DeskBookPrevious'<CR>
" quit/close a book.
nnoremap <silent><C-d>q :execute 'DeskBookQuit'<CR>
" rebind an open book, i.e. move to a new working directory.
nnoremap <silent><C-d>b :execute 'DeskBookRebind'<CR>
" rename a book.
nnoremap <silent><C-d>r :execute 'DeskBookRename'<CR>
" toggle book tree view.
nnoremap <silent><C-d>t :execute 'DeskBookTreeToggle'<CR>
" refreshes the tree and file search cache.
nnoremap <silent><C-d>c :execute 'DeskRefreshCache'<CR>
" search books by name.
nnoremap <silent><C-d>s :execute 'DeskSearchBookNames'<CR>
" search book pages by name.
nnoremap <silent><C-d>p :execute 'DeskSearchBookPageNames'<CR>
" }}}
iirc, learn vimscript the hard way walks you through this.
might not need this at all, but i've been using it for a while. may want to try removing it and see how it behaves. however, if it's weird, and probably will be, go ahead and bolt it in.
turning on the viml linter like in https://github.com/ratmav/vim-airline-system would be pretty sweet.
just need to toggle the tree in the current working directory, refresh file list, see hidden files.
cache refresh is broken. looks like i'm not calling into nerdtree or vim-ctrlspace properly. i'm going to remove the DeskBookRefreshCache
command and key mapping for now.
the g:NERDTree.ForCurrentTab().getRoot().refresh()
call failed with:
Error detected while processing function desk#commands#BookRefreshCache:
line 1:
E488: Trailing characters
and the ctrlspace#files#RefreshFiles()
call failed with:
Error detected while processing function desk#commands#BookRefreshCache[2]..ctrlspace#files#RefreshFiles[3]..ctrlspace#window#Toggle[52]..ctrlspace#engine#Content[5]..<SNR>142_contentSource:
line 3:
E716: Key not present in Dictionary: Name ==# "Buffer"
E15: Invalid expression: clv.Name ==# "Buffer"
Error detected while processing function desk#commands#BookRefreshCache[2]..ctrl
space#files#RefreshFiles[3]..ctrlspace#window#Toggle:
line 52:
E714: List required
go ahead and figure out #2 first, that will hopefully at least take care of vim-ctrlspace call.
see if you can add ctrlp as a dependency for now, then use that with the following config (put this in the desk init?):
" ignore tmp, swap, zip archives, and executables on macos, linux, and
" windows
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe
" ignore git metadata and (go, node.js) dependencies
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git)|(vendor|node_modules)$',
\ }
also, this snippet from the dotfiles looks like it worked, at least at some point:
let g:ctrlp_custom_ignore = '\v\.git|node_modules'
then...see about removing the go search engine from your fork of vim-ctrlspace.
do this after #2.
file name search, buffer name search, but ignore .git, node_modules, vendor (go), and so on.
really just need the tab/buffer/file container logic. i don't really use the fuzzy search engine/logic, or much else.
in autoload/desk/init.vim
around line 27: the vim-ctrlspace file search complains about the project root not being set if vim is opened in a directory without a .git, etc. directory, i.e. if ctrlspace#roots#FindProjectRoot()
comes back empty (wrapped with desk#utils#BookName()
). probably need the just set it to whatever the tcd is.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.