Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.
In order to design a piece of software we need to “design” the team that is going to produce it.
Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.
In order to design a piece of software we need to “design” the team that is going to produce it.
-- | |
-- Move this file to your neovim lua runtime path ie. ~/.config/nvim/lua/au.lua | |
-- | |
local cmd = vim.api.nvim_command | |
local function autocmd(this, event, spec) | |
local is_table = type(spec) == 'table' | |
local pattern = is_table and spec[1] or '*' | |
local action = is_table and spec[2] or spec | |
if type(action) == 'function' then |
testing
is a module I wrote for learning some Lua, and I find it quite useful for testing my modules written for neovim.
Since I come from the perspective of neovim, I simply has the module among my regular configuration, i.e. ~/.config/nvim/lua/testing.lua
.
Below shows a lua script that use the testing
module.
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'scrooloose/nerdtree' | |
"Plug 'tsony-tsonev/nerdtree-git-plugin' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'airblade/vim-gitgutter' |
function! s:format_coc_diagnostic(item) abort | |
return (has_key(a:item,'file') ? bufname(a:item.file) : '') | |
\ . '|' . (a:item.lnum ? a:item.lnum : '') | |
\ . (a:item.col ? ' col ' . a:item.col : '') | |
\ . '| ' . a:item.severity | |
\ . ': ' . a:item.message | |
endfunction | |
function! s:get_current_diagnostics() abort | |
" Remove entries not belonging to the current file. |
{ | |
"emojis": [ | |
{"emoji": "👩👩👧👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "👩👩👧👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "👩👩👦👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""}, | |
{"emoji": "👨👩👧👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z |
# I love super fast keyboard. Most of my friends and colleagues can't follow | |
# I use `atkbd.softrepeat=1` on the kernel command line. | |
# Even Visual Assist plugin in Visual Studio doubles keyboard repeat rate with _a reason_. | |
# I'm working on my laptop without X installed to avoid procrastination. | |
# I've spend a working day googling how to make `kbdrate` using slower delay than 250. | |
# Add this to your /etc/profile.d/kbdrate.sh: sudo kbdrate -r 82 -d 150 if you want it in console. | |
# Note that it will force you type password twice. I didn't find any workarounds. | |
xset r rate 150 82 | |
# When exiting from Vim, just type |
" 24 simple pseudo-text objects | |
" ----------------------------- | |
" i_ i. i: i, i; i| i/ i\ i* i+ i- i# | |
" a_ a. a: a, a; a| a/ a\ a* a+ a- a# | |
" can take a count: 2i: 3a/ | |
for char in [ '_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '-', '#' ] | |
execute "xnoremap i" . char . " :<C-u>execute 'normal! ' . v:count1 . 'T" . char . "v' . (v:count1 + (v:count1 - 1)) . 't" . char . "'<CR>" | |
execute "onoremap i" . char . " :normal vi" . char . "<CR>" | |
execute "xnoremap a" . char . " :<C-u>execute 'normal! ' . v:count1 . 'F" . char . "v' . (v:count1 + (v:count1 - 1)) . 'f" . char . "'<CR>" | |
execute "onoremap a" . char . " :normal va" . char . "<CR>" |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.