Skip to content

Shortening your .vimrc file and/or gives you trivial functionalities

License

Notifications You must be signed in to change notification settings

AC34/vim-scaffold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

         _                                  
         (_)                                 
  __   __ _  _ __ ___  ______                
  \ \ / /| || '_ ` _ \|______|               
   \ V / | || | | | | |                      
    \_/  |_||_| |_| |_|   __        _      _ 
                    / _| / _|      | |    | |
   ___   ___  __ _ | |_ | |_  ___  | |  __| |
  / __| / __|/ _` ||  _||  _|/ _ \ | | / _` |
  \__ \| (__| (_| || |  | | | (_) || || (_| |
  |___/ \___|\__,_||_|  |_|  \___/ |_| \__,_|
                                             
                                             

LICENSE SINCE Author

Requirements

System:

  • requres vim8.1

Vim:

  • requires autocmd

Introduction

Common settings, keybindigs and additional functionalities in one plugin, to get started with.

Currently implemented functionalities and settings are as follows:

  • Functionalities

    • searching
      • automatic searching of some trivial files when they open (This is to jump through content lines by n and N keys,instead of manually moving by k,l) (e.g. files like .bashrc) (You don't need this when you move with tagbars etc)
    • folding
      • automatic folding level(columns) adjustment
    • indenting
      • automatic tabstop update
  • keybindings

    • <Leader>g switching highlight search on/off
  • Common settings to get started with(enabled)(only if supported) look at sample vimrc file for more detail sample vimrc

    • incremental search
    • highlight search
    • text wrapping
    • no swap file
    • utf-8 compatibility
    • undolevels set to 500
    • history list set to 500
    • show line number column
    • 256 colors
    • mouse
    • clipboard
    • foldmethod set to "syntax"

Installation


your .vimrc

`Plug 'AC34/vim-scaffold'

:PlugInstall

Configuration

Settings that go well with this plugin

There are some settings that go well with this plugin.

1 Setting highlight colors

You want to set colors for highlighting. p> For command line vim, example might be as follows: au BufEnter * execute "hi search ctermfg=179 ctermbg=NONE" \| execute "hi Folded ctermfg=179 ctermbg=Black"

2 You might want to set Leader key

For switching highlight on/off by <Leader>g (this used to be <Leader>h for a while. changed on 2020/06/21)

3 Install syntax plugins

Syntax rules are needed for folding.

4 Keymaps for jumping between folded lines

Tabs can be convenient:
nnoremap <Tab> zj
nnoremap <S-tab> zk

5 set default tabstop

You will need default value for this when file is empty here is how its done for setting it to 2.
tabstop=2

Disabling keybindings

You can choose to disable some keybindings by giving 0 to corresponding variables.

disables highlight switch by <Leader>g let g:scaffold_leaderhighlight_enable = 0

Disabling Functionalities

You can choose to disable some funcitionalities by giving 0 to corresponding variables.

disables whole plugin(still being installed.)
let g:scaffold_mode = 0

disables autoindent functionality
let g:scaffold_autoindent_enable = 0

disables auto highlight
let g:scaffold_autohi_enable = 0

disables auto foldlevel(columns) settings
let g:scaffold_autofoldcol_enable = 0

Other Settings

sets max line numbers to use for analyzing indentation(to 500 lines in example below)
let g:scaffold_autoindent_maxcount = 500

Notes

This plugin is developed on vim-gtk(debian). might not work well with other kind of vims.

Background

People write the same settings over and over again in their .vimrcs. Plus there can be many functionalities that could be added upon a pure vim installation as "default". This plugin is my attempt to delegate those common settings,functionalitiles and keybindings from my .vimrc to a plugin, to base any other plugins upon.

Changes

2020/06/21 replaced ":set hls"(enabling search) by >Leader&ht; with ":set hlsearch!(switching highlight on/off)" by >Leader&ht; key.

About

Shortening your .vimrc file and/or gives you trivial functionalities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages