All Projects → zaid → vim-rec

zaid / vim-rec

Licence: Vim license
GNU Recutils syntax highlighting support for Vim

Programming Languages

Vim Script
2826 projects

Projects that are alternatives of or similar to vim-rec

cosme.vim
Cosmetic color scheme for Vim
Stars: ✭ 63 (+110%)
Mutual labels:  vim-plugin
poet-v
Vim Meets Poetry and Pipenv Virtual Environments
Stars: ✭ 57 (+90%)
Mutual labels:  vim-plugin
fzf-hoogle.vim
(neo)vim plugin that uses fzf for previewing hoogle search results
Stars: ✭ 37 (+23.33%)
Mutual labels:  vim-plugin
vim-swap
Easy swapping of text in Vim
Stars: ✭ 18 (-40%)
Mutual labels:  vim-plugin
filestyle
filestyle is a Vim plugin that highlights unwanted whitespace and characters.
Stars: ✭ 30 (+0%)
Mutual labels:  vim-plugin
todo-vim
Simple todo plugin for vim
Stars: ✭ 24 (-20%)
Mutual labels:  vim-plugin
vim-thematic
Alter Vim's appearance to suit your task & environ
Stars: ✭ 218 (+626.67%)
Mutual labels:  vim-plugin
vim-terminal
A Vim plugin that opens an interactive terminal in a buffer for running programs
Stars: ✭ 45 (+50%)
Mutual labels:  vim-plugin
denops-gh.vim
Vim/Neovim plugin for GitHub
Stars: ✭ 27 (-10%)
Mutual labels:  vim-plugin
swdc-vim
Track your programming activity in real-time in Vim
Stars: ✭ 19 (-36.67%)
Mutual labels:  vim-plugin
denops-docker.vim
Manage Docker in Vim/Neovim
Stars: ✭ 48 (+60%)
Mutual labels:  vim-plugin
uxntal.vim
Uxntal support for Vim
Stars: ✭ 32 (+6.67%)
Mutual labels:  vim-plugin
vim-gnote
make your mailbox as a note place
Stars: ✭ 16 (-46.67%)
Mutual labels:  vim-plugin
vim-counterpoint
Cycle between file counterparts in vim or neovim.
Stars: ✭ 12 (-60%)
Mutual labels:  vim-plugin
vim-commentor
Toggling comments became easier!
Stars: ✭ 29 (-3.33%)
Mutual labels:  vim-plugin
CommentFrame.vim
Add Comments in Frames to the file you're editing, or Comments aligned on the Right side of a line. Customizable!
Stars: ✭ 42 (+40%)
Mutual labels:  vim-plugin
DidYouMean
Vim plugin which asks for the right file to open
Stars: ✭ 82 (+173.33%)
Mutual labels:  vim-plugin
vim-lamp
💡Language Server Protocol client for Vim.
Stars: ✭ 34 (+13.33%)
Mutual labels:  vim-plugin
onestatus
an api to customize tmux from vim
Stars: ✭ 82 (+173.33%)
Mutual labels:  vim-plugin
equal.operator
A text-object for LHS/RHS of assignment.
Stars: ✭ 16 (-46.67%)
Mutual labels:  vim-plugin

GNU Recutils syntax support for Vim

This plugin provides syntax highlighting and runtime support for GNU Recutils' .rec files.

Vim-Rec.mov

Installation

  • If you're on Vim 8.x then you can use the built-in package support by running:

    mkdir -p ~/.vim/pack/default/start/vim-rec
    git clone [email protected]:zaid/vim-rec.git ~/.vim/pack/default/start/vim-rec
    
  • If you're using vim-plug then you can install it by adding the following to your .vimrc:

    Plug 'zaid/vim-rec'

  • If you're using minpac then you can install it by adding the following to your .vimrc:

    call minpac#add('zaid/vim-rec')

Features

  • Syntax highlighting.
  • Folding for records. (can be disabled by setting the g:recutils_no_folding variable to 1).
  • Command wrappers for recsel, recfix, recinf and rec2csv.
  • Auto-completion of record set properties.
  • Record navigation commands and maps.
  • Preview record descriptor in a popup/floating/preview window.

See help :recutils for more information.

Examples

Recfix

To find any syntax errors in the file, you can run :Recfix in any .rec buffer and the syntax errors will be loaded in a local location-list where you'll be able to navigate the list and jump straight to the line with the error.

Note The location-list will not open if there are no errors in the file.

Recsel

To query the Title of any book with a rating over 4, you can execute the following: :Recsel -t Book -p Title -e Rating>4

Recinf

To query the descriptors of records stored in a specifc .rec buffer, you can execute the following: :Recinf -d

Rec2csv

To convert Rec data into CSV format and populate it in a split buffer, you can execute the following: :Rec2csv -tBook

Notes

Whitespace might need to be escaped in certain scenarios. For example, the following line: :Recsel -t Book -p Title -e Rating>4 can be rewritten as: :Recsel -t Book -p Title -e Rating\ >\ 4

To close the floating window in Neovim, you can use any of the q, Esc, <localleader>, Ctrl-C or <Cr> keys.

Command maps

There are 6 command maps defined (which can be disabled by setting the g:recutils_no_maps variable to 1):

  • <localleader>rf Invokes :Recfix --check on the current buffer.
  • <localleader>rn populates the Vim command line with :Recinf.
  • <localleader>rs populates the Vim command line with :Recsel.
  • <localleader>rv populates the Vim command line with :Rec2csv.
  • <localleader>r] jumps to the next record descriptor.
  • <localleader>r[ jumps to the previous record descriptor.
  • <localleader>r? show the current record descriptor in a popup/floating/preview window.

Auto-completion

Basic support for auto-completing record set properties is available (by using C-x C-o when in insert mode). It can be disabled by setting the g:recutils_no_autocompletion variable to 1.

TODO

  • Keymaps for formatting text.

License

Copyright Zaid Al-Jarrah. Distributed under the same terms as Vim itself. See :help license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].