Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/bufferline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,8 @@ A few of this plugins commands can be mapped for ease of use. >vim
nnoremap <silent><mymap> :BufferLineMovePrev<CR>

" These commands will move the current buffer to the first or the last position in the bufferline
nnoremap <silent><mymap> :lua require'bufferline'.move_to(1)<CR>
nnoremap <silent><mymap> :lua require'bufferline'.move_to(-1)<CR>
nnoremap <silent><mymap> :BufferLineMoveFirst<CR>
nnoremap <silent><mymap> :BufferLineMoveLast<CR>

" These commands will sort buffers by directory, language, or a custom criteria
nnoremap <silent>be :BufferLineSortByExtension<CR>
Expand Down
2 changes: 2 additions & 0 deletions lua/bufferline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ local function setup_commands()
command("BufferLineCloseOthers", function() M.close_others() end)
command("BufferLineMoveNext", function() M.move(1) end)
command("BufferLineMovePrev", function() M.move(-1) end)
command("BufferLineMoveFirst", function() M.move_to(1) end)
command("BufferLineMoveLast", function() M.move_to(-1) end)
command("BufferLineSortByExtension", function() M.sort_by("extension") end)
command("BufferLineSortByDirectory", function() M.sort_by("directory") end)
command("BufferLineSortByRelativeDirectory", function() M.sort_by("relative_directory") end)
Expand Down