Coder Social home page Coder Social logo

dotfiles's People

Contributors

brendanorourke avatar

Watchers

 avatar

dotfiles's Issues

Compile YouCompleteMe on init

Linux

Per: https://github.com/Valloric/YouCompleteMe#linux-64-bit

  • Ensure prerequisites sudo apt install build-essential cmake python3-dev
  • Compile plugin cd ~/.vim/bundle/YouCompleteMe && python3 install.py --clang-completer
  • (Optional) Java support (after OpenJDK install), add --java-completer to install.py call
  • (Optional) Golang support (after Go install), add --go-completer to install.py call
  • (Optional) JS/TS support (after Node & npm install), add --ts-completer to install.py call

macOS

Per: https://github.com/Valloric/YouCompleteMe#mac-os-x

  • Install macvim
  • Symlink vim to macvim using ln -s /usr/local/bin/mvim vim
  • Reinstall plugins via Vundle: (n)vim +PluginInstall +qall

Standardize file extraction logic

As it stands, logic to extract compressed files from HTTP downloads is all over the place, see here.

That's one ugly function.

Logic for extracting files should be abstracted into a util function, which can also be exposed as terminal bin, for the user.

A great example from nparikh:

smartextract () {
    if [ -f $1 ]; then
        case $1 in
            *.tar.bz2)  tar -jxvf $1        ;;
            *.tar.gz)   tar -zxvf $1        ;;
            *.bz2)      bunzip2 $1          ;;
            *.dmg)      hdiutil mount $1    ;;
            *.gz)       gunzip $1           ;;
            *.tar)      tar -xvf $1         ;;
            *.tbz2)     tar -jxvf $1        ;;
            *.tgz)      tar -zxvf $1        ;;
            *.zip)      unzip $1            ;;
            *.Z)        uncompress $1       ;;
            *)          echo "'$1' cannot be extracted/mounted via smartextract()" ;;
        esac
    else
        echo "'$1' is not a valid file"
    fi
}

Brew cask command is deprecated

The script current uses the following command structure when installing casks:

brew cask install <<cask>>

Which results in the following:

Error: `brew cask` is no longer a `brew` command. Use `brew <command> --cask` instead.

Update the ./init/30_osx_homebrew_casks.sh script to instead use the following:

brew install <<cask>>

Standardize use of HTTP Clients

Currently, the dotfiles use a combination of curl && wget. In fact, running for Ubuntu installs curl ๐Ÿ‘Ž, see here.

This should be abstracted to a global download() util, that routes automatically to the proper system HTTP client based on OS.

For example:

download() {
    if command -v "curl" &> /dev/null; then
      # use curl
    elif command -v "wget" &> /dev/null; then
       # use wget
    fi
    return 1
}

Tasks

  • Abstract HTTP clients into download function
  • Remove OS-specific installs of non-standard HTTP clients
  • Update all areas of the code that make an HTTP request

Add neovim support for Linux

Installation

  • Ensure prerequisites sudo apt-get install software-properties-common python-dev python-pip python3-dev python3-pip
  • Add PPA sudo add-apt-repository ppa:neovim-ppa/stable
  • Add APT package sudo apt-get install neovim

Configuration

Per: https://neovim.io/doc/user/nvim.html#nvim-from-vim

  • Add support for .config directory
  • Instantiate .config/nvm/init.vim
  • Run nvim +PluginInstall +qall
  • (Optional) alias vim=nvim

Add Source Code Pro font

Tasks

  • Add script (1) to /scripts/
  • Instantiate script on init
  • Modify configs to default to Source Code Pro

Snippets

  1. Install
#!/bin/sh
# Userland mode (~$USER/), (~/).

# ~/.fonts is now deprecated and that
#FONT_HOME=~/.fonts
# ~/.local/share/fonts should be used instead
FONT_HOME=~/.local/share/fonts

echo "installing fonts at $PWD to $FONT_HOME"
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro"
# find "$FONT_HOME" -iname '*.ttf' -exec echo '{}' \;

(git clone \
   --branch release \
   --depth 1 \
   'https://github.com/adobe-fonts/source-code-pro.git' \
   "$FONT_HOME/adobe-fonts/source-code-pro" && \
fc-cache -f -v "$FONT_HOME/adobe-fonts/source-code-pro")

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.