" File : keybindings.vim " Author : Jeff LANCE " Date : 15.04.2015 " Last Modified Date: 06.09.2021 " Last Modified By : Jeff LANCE """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " _ _________ ______ ___ _ _ ____ ___ _ _ ____ ____ " | |/ / ____\ \ / / __ )_ _| \ | | _ \_ _| \ | |/ ___/ ___| " | ' /| _| \ V /| _ \| || \| | | | | || \| | | _\___ \ " | . \| |___ | | | |_) | || |\ | |_| | || |\ | |_| |___) | " |_|\_\_____| |_| |____/___|_| \_|____/___|_| \_|\____|____/ " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Custom {{{ " ----- " Disable highlights when you press : map :noh " Enable folding with the spacebar nnoremap za " Source current file map s :echom 'Source file' :so % " Two semicolons to escape map ; map! ; " Open a current file with sudo " map E :e suda://% " Save a current file with sudo " map W :w suda://% " Comment the target of a motion map / :Commentary " Indent line map >> map << " (Re|Un)do map uu " Save as map :saveas " ----- " }}} " Buffers {{{ " ----- command! -bang -nargs=? -complete=dir Files \ call fzf#vim#files( \ , \ fzf#vim#with_preview( \ {'options': ['--layout=reverse', '--info=inline']} \ ), \ 0 \ ) map :echom 'Close buffer' :call BufClose() map :e map :DashboardNewFile map :bn map :bp " ----- " }}} " Windows {{{ " ----- map :call WinMove('h') map :call WinMove('j') map :call WinMove('k') map :call WinMove('l') " ----- " }}} " Dashboard {{{ " ----- nmap ss :SessionSave nmap sl :SessionLoad nnoremap fh :DashboardFindHistory nnoremap ff lua require('telescope.builtin').find_files() nnoremap tc :DashboardChangeColorscheme nnoremap fa :DashboardFindWord nnoremap fb :DashboardJumpMark nnoremap cn :DashboardNewFile " ----- " }}} " Find file {{{ " ----- map lua require('telescope.builtin').find_files() " ----- " }}} " Header {{{ " ----- map :AddHeader " ----- " }}} " Markdown {{{ " ----- map mp :! pandoc "%" -o "%:r".pdf && zathura "%:r".pdf " ----- " }}} " Vimroom {{{ " ----- nnoremap z :Goyo " ----- " }}} " Vimux {{{ " ----- map vp :VimuxPromptCommand " map vr :VimuxRunCommand " map vo :VimuxOpenRunner " ----- " }}} " Functions {{{ " ----- " Renaming map r :call RenameFile() " Open file under cursor map o :call GotoFile("") " Surround map ' S' map " S" map [ S[ map { S{ map ( S( " " Rewrap paragraph using " map {gq}:echo "Rewrapped paragraph" " Git map Gs :Git status map Ga :Git add map Gc :Git commit " ----- " }}} " vim:ft=vim