Skip to content

Commit

Permalink
format json in vim using jq
Browse files Browse the repository at this point in the history
  • Loading branch information
ericuni committed Jun 15, 2024
1 parent e736ea1 commit de6ea55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions env/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if [[ ! -d opt ]]; then
mkdir opt
fi

sudo apt install jq

cd opt

# neovim
Expand Down Expand Up @@ -122,6 +124,8 @@ if [[ $? -ne 0 ]]; then
rm gcm.deb
fi

exit 0

# blade and cxx
sudo apt install \
ninja-build \
Expand Down Expand Up @@ -157,5 +161,3 @@ if [[ $? -ne 0 ]]; then
# docker images
fi

exit 0

1 change: 1 addition & 0 deletions vim/packer/lua/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ wk.register({
m = { "<cmd>CocList marketplace<cr>", "Marketplace" },
}
},
j = { "<cmd>%!jq .<cr>", "Json file format"},
w = {
name = "Window",
w = {"<c-w>w<cr>", "switch to other Window"},
Expand Down

0 comments on commit de6ea55

Please sign in to comment.