Code Monkey home page Code Monkey logo

vim-scaffold's Introduction

         _                                  
         (_)                                 
  __   __ _  _ __ ___  ______                
  \ \ / /| || '_ ` _ \|______|               
   \ 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.

vim-scaffold's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.