Giter Club home page Giter Club logo

nvim's Introduction

Nvim DevHerles

Nvim DevHerles pic

Install in one command

The following will install this config if you have an existing config it will move it to ~/.config/nvim.old

This script only supports Ubuntu

bash <(curl -s https://raw.githubusercontent.com/DevHerles/nvim/master/utils/install.sh)

Installing Oracle SDK (for coc-xml)

Downloading SDK binaries

Download SDK binaries in .tar.gz (tarball) by heading over to their website

Installing

Create a directory to install SDK in with:

sudo mkdir /usr/local/java

Move the SDK binaries into the directory:

sudo mv jdk-8u261-linux-x64.tar.gz /usr/local/java

Go into the install directory:

cd /usr/local/java

Unpack the tarball:

sudo tar -xzfv jdk-8u261-linux-x64.tar.gz

Post-installation steps

To save space, delete the tarball by running:

sudo rm jdk-8u261-linux-x64.tar.gz

Let the system know where SDK is installed:

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_26/bin/java" 1

You must update the previous path in coc-settings.json like:

// java
"xml.java.home": "/usr/local/java/jdk1.8.0_261",

Don't forgot... :CocRestart

After that's done, check the installation by running:

java -version

It should output the following:

java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

Vim awesome commands

vi/vim/nvim, how can I write out a number of lines to a new file

:100,200w filename
Of course 100,200 is the range of lines you want to write.

:'a,'b w filename then hit return.

vim -c "100,200w new_file.txt" -c wq original_file.txt

For example: :+0,+99w filename write the next 100 lines to filename.

:.w >> filename and hitting return.

Jump to particular line number from a shell prompt, enter:

$ vim +linenumber file.py
$ vim +3 __init__.py

Jump to particular line that contains main() function from a shell prompt, enter:

$ vim +/searchTermHere file.py

$ vim +/main initlib.c
### note shell escape done with \ ###
$ vim +/addUser\( initlib.c
$ vim +/addUser\(arg1\) initlib.c

git-diff to ignore ^M

$ git config --global core.autocrlf true

Of course, this is said to convert crlf to lf, while you want to convert cr to lf. I hope this still works โ€ฆ

And then convert your files:

Remove everything from the index

$ git rm --cached -r .

If you have already added the files to be tracked, you need to remove them from tracking:

git rm .env --cached
git commit -m "Stopped tracking .env File"

Re-add all deleted files to the index

You should get lots of messages like: "warning: CRLF will be replaced by LF in ."

$ git diff --cached --name-only -z | xargs -0 git add
$ git commit -m "Fix CRLF"

Lazygit config.yml

reporting: "on"
startuppopupversion: 1
gui:
  theme:
    lightTheme: false # For terminals with a light background
    activeBorderColor:
      - green
      - bold
    inactiveBorderColor:
      - white
    optionsTextColor:
      - cyan
    selectedLineBgColor:
      - black
    selectedRangeBgColor:
      - blue

nvim's People

Contributors

devherles 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.