salcode / ironcode-vim

A Vim Configuration focused on WordPress development and predominantly used on a Mac with Neovim
9 stars 1 forks source link

Have an easy to apply command line to bare config Vim #131

Open salcode opened 6 years ago

salcode commented 6 years ago

This conversation on Reddit made me realize, I should have a ready to go mini-configuration line to use when I'm working on a remote machine that does not have my own .vimrc in place.

This is the conversation and the mini-config mentioned.

If you get used to it, you will lose when working with empty vimrc

It's not that big a deal to me. I have a one-key terminal shortcut that imports a minimal vim config when a barebones Vim is open (say, in a one-off SSH session). The shortcut literally inputs the following one-liner: :set expandtab tabstop=2 shiftwidth=2 smarttab\n:set incsearch ignorecase smartcase hlsearch\n:set hidden\n:set wildmenu\n:let mapleader=" "\n:map - :\n:inoremap jj <esc>\n:map J 5j\n:map K 5k\n:nmap 0 ^\n:map Y y$\n:noremap Q <nop>\n:map <leader>q :q<cr>\n:map <leader>w :w<cr>\n:map <leader>z :x<cr>\n:nmap <leader>q :qa!<cr>\n:noremap ' "\n:map <silent> <m-d> <c-d>\n:map <silent> <m-u> <c-u>\n:map <silent> <m-e> <c-e>\n:map <silent> <m-y> <c-y>\n:map <m-o> <c-o>\n:map <c-n> <esc>:tabnew<cr>\n:map <silent> <m-q> :q<cr>\n:map <silent> <m-w> :w<cr>\n:map <c-h> gT\n:map <m-l> gt\n:nnoremap <leader><leader> <C-^>\n:noremap <leader>n <c-w><c-w>\n:noremap <m-]> 20zl\n:noremap <m-[> 20zh\n:map <c-p> :e */**/*\n:inoremap <c-e> <end>\n:inoremap <c-f> <right>\n:inoremap <c-b> <left>\n:cnoremap <c-f> <right>\n:cnoremap <c-b> <left>\n:echo 'Config loaded!'\n

And how often I am on a computer other than my macbook pro? The answer is never.

See https://www.reddit.com/r/vim/comments/83y4y4/antipatterns_what_not_to_do/dvm22pu/

salcode commented 6 years ago

My Iron Code Remote vimrc project is related to this idea.