Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

jaandrle/vim-jaandrle_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

jaandrle_utils.vim

Some helper functions used in my .vimrc.

Installation

Install using your favorite package manager, or use Vim's built-in package support:

mkdir -p ~/.vim/bundle/vim-jaandrle_utils
cd ~/.vim/bundle/vim-jaandrle_utils
git clone -b main --single-branch https://github.com/jaandrle/vim-jaandrle_utils.git --depth 1

In .vimrc:

set runtimepath^=~/.vim/bundle/*

Now, you can use any function.

Functions list

function! jaandrle_utils#trimEndLineSpaces(line_start, line_end) The name doesn't lie
function! jaandrle_utils#fold_nextClosed(dir)

function! jaandrle_utils#fold_nextOpen(dir)

Use j/k as arguments, navigates to the next fold.

function! jaandrle_utils#grep(...)
`:grep` alternative which is asynchronous and also uses system grep tool (see `:help 'grepprg'`)
function! jaandrle_utils#redir(is_keep, command, range, line_start, line_end)
Redirecs any Vim `command` to ‘nofile’ buffer, `is_keep` modify deleting buffer when leaving and also (no)split.
```
command! -complete=command -bar -range -nargs=+ ALTredir call jaandrle_utils#redir(0, <q-args>, <range>, <line1>, <line2>)
" run curent line(s) in node
'<,'>ALTredir !node
" changes in buffer
ALTredir changes
```
function! jaandrle_utils#AppendModeline(additional)
Add current `modeline` (see `:help modeline`)
function! jaandrle_utils#MapSmartKey(key_name)
Argument `Home`/`End` → smart key behav. (first, first nonwhite, hadle wrap, …)
function! jaandrle_utils#copyRegister()
To copy content between registers
function! jaandrle_utils#gotoJumpChange(cmd)
Argument can be `"jump"`/`"changes"`, invokes combination of showing list and option to navigate
function! jaandrle_utils#gotoMarks()
Argument is `mark` name, invokes combination of showing list and option to navigate (via `g\`★`)

TODO

  • better README
  • tbd

About

Some helper functions used in my `.vimrc`.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors