I use this little function on the command line to allow me to switch between different repositories easily using fzf
- fzf
- zsh or bash
| { | |
| // Different cursor styles for each mode | |
| "vim.cursorStylePerMode.insert": "line-thin", | |
| "vim.cursorStylePerMode.normal": "block", | |
| "vim.cursorStylePerMode.replace": "block-outline", | |
| // Duh | |
| "vim.disableExtension": false, | |
| // Enable easymotion plugin and set the color and size of the markers |
| import i18n from 'i18next' | |
| import LanguageDetector from 'i18next-browser-languagedetector' | |
| import { initReactI18next } from 'react-i18next' | |
| import * as locales from '../locales/index' | |
| import * as momentConfig from './moment' | |
| const resources = locales; | |
| i18n.use(LanguageDetector) // Detect the language from the ?lang param |
| type HandleResponse<T> = HandleResult<T> | HandleError; | |
| type HandleResult<T> = [null, T]; | |
| type HandleError = [Error, null]; | |
| export const handle = async <T = any>(prom: Promise<T>): Promise<HandleResponse<T>> => { | |
| try { | |
| const res = await prom; | |
| return [null, res] as HandleResult<T>; | |
| } catch (err) { | |
| return [err, null] as HandleError; |
| { | |
| "rulesDirectory": ["node_modules/codelyzer"], | |
| "rules": { | |
| "arrow-return-shorthand": true, | |
| "callable-types": true, | |
| "class-name": true, | |
| "comment-format": [true, "check-space"], | |
| "curly": true, | |
| "eofline": true, | |
| "forin": true, |